User Tools

Site Tools


pdf:fontsexamples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
pdf:fontsexamples [2015/04/02 18:16]
christian
pdf:fontsexamples [2016/02/24 12:32]
christian
Line 1: Line 1:
 ====== Using Fonts ====== ====== Using Fonts ======
  
-This prints a list of all the loaded fonts. (A slightly modified version is integrated as PDF.Document ​demo4a_loadedFonts)+This prints a list of all the loaded fonts. (A slightly modified version is integrated as ''​PDF.Document ​demo04a_loadedFonts''​)
  
 <code smalltalk>​ <code smalltalk>​
Line 9: Line 9:
     renderer setFont: #Helvetica size: 18.     renderer setFont: #Helvetica size: 18.
     renderer textMatrix: #(1 0 0 1 10 580); showString: 'Font list'.     renderer textMatrix: #(1 0 0 1 10 580); showString: 'Font list'.
-    Graphics.Fonts.Font loadedFonts keys asSortedCollection do: [:each |+    Graphics.Fonts.Font loadedFonts keys asSortedCollection do: [:fontSymbol ​|
       renderer add: (TextPositioningOperator Td operands: #(0 -20)).       renderer add: (TextPositioningOperator Td operands: #(0 -20)).
       renderer setFont: #Helvetica size: 12.       renderer setFont: #Helvetica size: 12.
-      renderer showString: ​each asString. +      renderer showString: ​fontSymbol ​asString. 
-      renderer setFont: ​each size: 12.+      renderer setFont: ​fontSymbol ​size: 12.
       renderer add: (TextPositioningOperator Td operands: #(0 -15)).       renderer add: (TextPositioningOperator Td operands: #(0 -15)).
       renderer showString: 'The quick brown fox jumps...'​]]].       renderer showString: 'The quick brown fox jumps...'​]]].
 page saveAndShowAs:​ '​loadedFonts.pdf'​ page saveAndShowAs:​ '​loadedFonts.pdf'​
 </​code>​ </​code>​
-{{demo4a_loadedfonts.pdf}}+{{demo04a_loadedfonts.pdf}}
/var/www/virtual/code4hl/html/dokuwiki/data/pages/pdf/fontsexamples.txt · Last modified: 2016/02/24 12:32 by christian