manual:chapter3:fonts

newRPL fully supports font customization: each part of the display interface uses its own font, as well as selected environments such as the command line or the forms engine.

Since text support in newRPL is based on Unicode 10.0, fonts support up to 65536 different glyphs and represent up to 1048576 different code points. Fonts can be any size and be fixed-width or proportional.

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.

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 FNTSTO executes this operation. A font object can be recalled to the stack by the FNTRCL command and uninstalled using the 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.

Size Name Notes
5 pixels Font5A
Font5B
Font5C
6 pixels Font6A Default for Menu, Status Area and Plots
Font6B
7 pixels Font7A
8 pixels Font8A
Font8B
Font8C Default for Stack (1st level), Stack (other levels), Forms and Command Line
Font8D
10 pixels Font10A Based on HP48 font

These are the independent areas and environments that can be customized with fonts:

  • Stack (1st level): this area usually contains the expression currently input or the last result computed. Given its relevance, it can be emphasized with a different font from the rest of the stack;
  • Stack (other levels): a smaller font can be used to maximize the amount of data displayed in the other levels of the stack;
  • Command line: this is the area where instructions are currently typed before being interpreted by newRPL;
  • Menus: usually small fonts are used here, however some users might prefer a larger font. it's not possible to choose different fonts for Menu 1 and 2;
  • 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;
  • Forms: another environment where the ratio between readability and amount of information displayed can be tailored to the user's preferences.

Fonts 21 NEW

Command Short Description
FNTSTO Install a user font for system use NEW
FNTRCL Recall a system font NEW
FNTPG Purge a user-installed system font NEW
FNTSTK Recall name of current font for stack area NEW
FNT1STK Recall name of current font for stack level 1 NEW
FNTMENU Recall name of current font for menu area NEW
FNTCMDL Recall name of current font for command line area NEW
FNTSTAT Recall name of current font for status area NEW
FNTPLOT Recall name of current font for plot objects NEW
FNTFORM Recall name of current font for forms NEW
→FNTSTK Change current font for stack area NEW
→FNT1STK Change current font for stack level 1 NEW
→FNTMENU Change current font for menu area NEW
→FNTCMDL Change current font for command line area NEW
→FNTSTAT Change current font for status area NEW
→FNTPLOT Change current font for plot objects NEW
→FNTFORM Change current font for forms NEW
FNTHELP Recall name of current font for help NEW
FNTHLPT Recall name of current font for help title NEW
→FNTHELP Change current font for help text NEW
→FNTHLPT Change current font for help title NEW
  • manual/chapter3/fonts.txt
  • Last modified: 2019/11/25 03:17
  • by jojo1973