[[TOC(heading=Table of Contents, Docs/Prog/*)]] [[PageOutline]] = Display = Multiple fonts are supported using the nano-X (microwindows) .fnt format. The Cardinal !SmartWeigh Font converter program may be used to convert !TrueType ttf fonts to the .fnt format. Proper licensing must be obtained for any copyrighted fonts to be used. A special button font is provided with characters that are formatted to be used as buttons for “Zero”, “Tare”, “Gross”, “Net”, “Units”, and “Print”. == Fonts == Fonts are stored in the 825 in files with the Linux nano-X (rockbox) format .fnt. The font folder is /mnt/nand/fonts. The 825 graphics device driver and the lib825 application library provide functions for loading fonts into RAM memory and displaying text using the loaded fonts '''!ReadFont''' The lib825 function “!ReadFont” is used to read and load a font file into RAM. The parameter nFont is a font number which should be in the range: 1 – 29 The parameter pszFilename is the full path and filename of the font such as: “/mnt/nand/fonts/Font788_11x2.fnt” (Reminder: Linux path and filenames are case sensitive) '''int''' '''!ReadFont'''('''int''' nFont, '''const''' '''char'''* pszFilename) The return value is zero if successful or one if an error occurred. '''!DisplayStr''' The lib825 function “!DisplayStr” is used to display a text string using a specified font. The parameter nFont is a font number of a font previously loaded into RAM using !ReadFont The parameter x is the X coordinate The parameter y is the Y coordinate The parameter dsplogic is the display logic which may be DSP_LOGIC_SET, DSP_LOGIC_XOR, DSP_LOGIC_RESET, or DSP_LOGIC_OVERWRITE '''#define''' DSP_LOGIC_SET 0 '''#define''' DSP_LOGIC_XOR 1 '''#define''' DSP_LOGIC_RESET 2 '''#define''' DSP_LOGIC_OVERWRITE 3 '''void''' !DisplayStr('''int''' nFont, '''int''' x, '''int''' y, '''int''' dsplogic, '''const''' '''char'''* p) '''Font788.exe''' The Windows utility program Font788.exe, previously part of the !SmartWeigh install is updated to allow converting 788 fonts or TTF fonts to 825 format. (If your PC does not have the appropriate support files to run this program run the “vcredist.exe” program to install them). Make sure all font copyrights are observed. Obtain proper licensing for any fonts to be used. A new menu option “Load built-in font…” is provided. This allows loading the standard built in fonts. The “File” “Export” option now allows “Export to 825 format...” The “Font” menu has an additional feature “Information” which allows detailed viewing and some limited editing of fonts. Font characters may be modified by clicking the squares representing each pixel. If a pixel which is on is clicked it will be turned off. If a pixel which is off is clicked it will be turned on. '''Remote Control using custom fonts''' To use apps using custom fonts with remote control the !DspApplet.class should be at least version 1.09 The version will show at the bottom of the applet. A fonts link should be created in the html folder: This allows the applet to access the fonts in /mnt/nand/fonts from the default html location. [[Top]]