manual:chapter3:fonts

Differences

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

Link to this comparison view

Next revision
Previous revision
manual:chapter3:fonts [2019/11/21 15:27]
jojo1973 created (part 1)
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.
  
 ^ Size  ^ Name  ^ Notes  ^ ^ Size  ^ Name  ^ Notes  ^
-| 5 pixels  | Font5A  |  | +| 5 pixels **Font5A**  
-| ::: | Font5B  |  | +| ::: | **Font5B**  
-| ::: | Font5C  |  | +| ::: | **Font5C**  
-| 6 pixels  | Font6A  | Default for Menu, Status Area and Plots  | +| 6 pixels **Font6A**  | Default for Menu, Status Area and Plots  | 
-| ::: | Font6B  |  | +| ::: | **Font6B**  
-| 7 pixels  | Font7A  |  | +| 7 pixels **Font7A**  
-| 8 pixels  | Font8A  |  | +| 8 pixels **Font8A**  
-| ::: | Font8B  |  | +| ::: | **Font8B**  
-| ::: | Font8C  | Default for Stack (1<sup>st</sup> level), Stack (other levels), Forms and Command Line  | +| ::: | **Font8C**  | Default for Stack (1<sup>st</sup> level), Stack (other levels), Forms and Command Line  | 
-| ::: | Font8D  |  | +| ::: | **Font8D**  
-| 10 pixels  | Font10A  |  |+| 10 pixels **Font10A**  Based on HP48 font  |
  
 These are the independent areas and environments that can be customized with fonts: These are the independent areas and environments that can be customized with fonts:
Line 32: Line 32:
   * **Status Area**: same as above. A larger font provides readability at the cost of less space for stack display;   * **Status Area**: same as above. A larger font provides readability at the cost of less space for stack display;
   * **Plot objects**: to maximize real estate for plots a very small font might be preferable;   * **Plot objects**: to maximize real estate for plots a very small font might be preferable;
-  * **Forms**: another environment where the ratio between readability and amount of displayed data can be tailored to the user's preferences.+  * **Forms**: another environment where the ratio between readability and amount of information displayed can be tailored to the user's preferences.
      
 ==== Font related commands ==== ==== Font related commands ====
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.1574378829.txt.gz
  • Last modified: 2019/11/21 15:27
  • by jojo1973