Skip to content

Commit

Permalink
removed spaces from indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
penguindark committed Jul 17, 2022
1 parent 788e5de commit 51ef90e
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions examples/example_08_ttf_font.v
Original file line number Diff line number Diff line change
Expand Up @@ -23,51 +23,51 @@ fn main() {

// Raw PDF usage
content.txt = '
% our first string printed with TTF fonts
q'

mut count := 0
for _, v in doc.ttf_font_used {
content.txt += "
BT
/${v.font_name} 20 Tf
10 ${780 - 20 * count} Td
(Prova Font ${v.font_name} #!=> Ancora di nuovo!!) Tj
ET
"
count++

content.txt += "
BT
/${v.font_name} 20 Tf
10 ${780 - 20 * count} Td
(AAAAA ${v.font_name} #!=> Again PDF for V tests!!) Tj
ET
"

count++
}

content.compress = true
// add the page Object to the PDF
% our first string printed with TTF fonts
q'

mut count := 0
for _, v in doc.ttf_font_used {
content.txt += "
BT
/${v.font_name} 20 Tf
10 ${780 - 20 * count} Td
(Prova Font ${v.font_name} #!=> Ancora di nuovo!!) Tj
ET
"
count++

content.txt += "
BT
/${v.font_name} 20 Tf
10 ${780 - 20 * count} Td
(AAAAA ${v.font_name} #!=> Again PDF for V tests!!) Tj
ET
"

count++
}

content.compress = true
// add the page Object to the PDF
doc.add_page_obj(mut page, content)


//*************
// Page 2
//*************
// simplified font usage
// simplified font usage

page_n1 := doc.create_page(pdf.Page_params{
page_n1 := doc.create_page(pdf.Page_params{
format: 'A4'
gen_content_obj: true
compress: false
})
page = &doc.page_list[page_n1]
page.user_unit = pdf.mm_unit

mut fnt_params := pdf.Text_params{
mut fnt_params := pdf.Text_params{
font_size: 14.0
font_name: 'SA'
s_color: pdf.RGB{
Expand Down

0 comments on commit 51ef90e

Please sign in to comment.