Squeak Class Documentation category index | class index  
 
FontSet
  category: Graphics-Text
  superclass: Object
  subclasses:

FontSet provides a mechanism for storing a set of fonts as a class that can be conveniently filedOut, filedIn, and installed as a TextStyle.

The most common use is...
Find a font you like.
Use BitFont to convert a bunch of sizes to data files named, eg, LovelyNN.BF
Use FontSet convertFontsNamed: 'Lovely' to produce a FontSet named Lovely.
FileOut that FontSet for later use.
Use Lovely installAsTextStyle to make all sizes available in a TextStyle
named #Lovely in the TextConstants dictionary.
Use ctrl-k in any text pane to select the new Lovely style for that paragraph.
Then use cmd-1 through 5 or cmd-k to set the point-size for any selection.

instance methods
  no messages
 

class methods
  as yet unclassified
  convertFontsNamed:

  compiling
  acceptsLoggingOfCompilation
compileFont:

  converting
  convertFontsNamed:inDirectoryNamed:
convertTextStyleNamed:

  filein/out
  fileOut

  installing
  fontNamed:fromLiteral:
installAsDefault
installAsTextStyle
size:fromLiteral:

  private
  fontCategory
fontName
fontSetClass:

instance methods
  no messages top  

class methods
  as yet unclassified top  
 

convertFontsNamed:

FontSet convertFontsNamed: 'Palatino'


  compiling top  
 

acceptsLoggingOfCompilation

Dont log sources for my subclasses, so as not to waste time
and space storing printString versions of the string literals.


 

compileFont:


  converting top  
 

convertFontsNamed:inDirectoryNamed:

FontSet convertFontsNamed: 'Tekton' inDirectoryNamed: 'Tekton Fonts'


 

convertTextStyleNamed:


  filein/out top  
 

fileOut

FileOut and then change the properties of the file so that it won't be
treated as text by, eg, email attachment facilities


  installing top  
 

fontNamed:fromLiteral:

This method allows a font set to be captured as sourcecode in a subclass.
The string literals will presumably be created by printing, eg,
(FileStream readOnlyFileNamed: 'Palatino24.sf2') contentsOfEntireFile,
and then pasting into a browser after a heading like, eg,
sizeNewYork10
^ self fontNamed: 'NewYork10' fromLiteral:
'--unreadable binary data--'

See the method installAsTextStyle to see how this can be used.


 

installAsDefault

FontSetNewYork installAsDefault


 

installAsTextStyle

FontSetNewYork installAsTextStyle


 

size:fromLiteral:

This method allows a font set to be captured as sourcecode in a subclass.
The string literals will presumably be created by printing, eg,
(FileStream readOnlyFileNamed: 'Palatino24.sf2') contentsOfEntireFile,
and then pasting into a browser after a heading like, eg,
size24
^ self size: 24 fromLiteral:
'--unreadable binary data--'

See the method installAsTextStyle to see how this can be used.


  private top  
 

fontCategory


 

fontName


 

fontSetClass: