manual:chapter3:fonts

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
manual:chapter3:fonts [2019/11/21 15:34]
jojo1973
manual:chapter3:fonts [2019/11/25 03:17] (current)
jojo1973 [Fonts]
Line 7: Line 7:
 A font object is represented on the stack as ''FONTDATA xx yyy...'', where ''yyy...'' is a string of characters (''A''-''Z'', ''a''-''z'', ''$'' and ''#'') encoding the glyphs and the translation table that associates glyphs to Unicode code points while ''xx'' is the length (padded to a multiple of 4 bytes) of the aforementioned block, expressed in nibbles. A font object is represented on the stack as ''FONTDATA xx yyy...'', where ''yyy...'' is a string of characters (''A''-''Z'', ''a''-''z'', ''$'' and ''#'') encoding the glyphs and the translation table that associates glyphs to Unicode code points while ''xx'' is the length (padded to a multiple of 4 bytes) of the aforementioned block, expressed in nibbles.
  
-To install a font on the system it must be stored into a variable, whose name will become the name of the font. The command ''[[manual:chapter6:fonts:cmd_fntsto|FNTSTO]]'' is used to finalize the installation of the font. A font object can be recalled by the ''[[manual:chapter6:fonts:cmd_fntrcl|FNTRCL]]'' command and uninstalled by the ''[[manual:chapter6:fonts:cmd_fntpg|FNTPG]]'' command.+The installation of a font on the system is performed by storing the font object into a special variable, whose name will become the name of the font. The command ''[[manual:chapter6:fonts:cmd_fntsto|FNTSTO]]'' executes this operation. A font object can be recalled to the stack by the ''[[manual:chapter6:fonts:cmd_fntrcl|FNTRCL]]'' command and uninstalled using the ''[[manual:chapter6:fonts:cmd_fntpg|FNTPG]]'' command.
  
 **newRPL** already provides 11 system fonts which are always available and can't be uninstalled. Smaller sizes are suited for soft keys, while larger sizes are preferable for stack display; however nothing prevents using large sizes for soft keys and small sizes for stack display. **newRPL** already provides 11 system fonts which are always available and can't be uninstalled. Smaller sizes are suited for soft keys, while larger sizes are preferable for stack display; however nothing prevents using large sizes for soft keys and small sizes for stack display.
Line 38: Line 38:
 {{page>manual:chapter6:fonts&nofooter&noeditbtn&inline}} {{page>manual:chapter6:fonts&nofooter&noeditbtn&inline}}
  
-==== Building user-defined fonts ==== 
- 
-To build a custom font is not difficult at all. Necessary tools are: 
- 
-  - a graphic editor capable of saving images in .bmp format (monochrome or 256-color) to draw the glyphs; 
-  - a text file providing the association between the glyphs and Unicode code points; 
-  - the ''bmp2font'' tool, whose source code is avilable in ''newrpl/tools/fonts/bmp2font/''. Instructions about how to compile an executable are [[manual:chapter1:buildfromsource#bmp2font|here]]. 
-   
-FIXME 
  • manual/chapter3/fonts.1574379280.txt.gz
  • Last modified: 2019/11/21 15:34
  • by jojo1973