Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
manual:chapter3:fonts [2019/11/22 15:53] jojo1973 Font building, part 2 |
manual:chapter3:fonts [2019/11/23 09:11] jojo1973 Finished |
||
---|---|---|---|
Line 7: | Line 7: | ||
A font object is represented on the stack as '' | A font object is represented on the stack as '' | ||
- | To install | + | The installation of a font on the system |
**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 70: | Line 70: | ||
A closer examination of the file reveals that the bitmap is actually 11 pixel high rather than 10. The extra bottom row of pixels is used to encode the width of each glyph: under the first glyph there are five black pixels, therefore the width of that glyph is 5 pixels; under the second glyph there are five white pixels thus its width is 5 pixels again, and so on until the end of the bitmap. | A closer examination of the file reveals that the bitmap is actually 11 pixel high rather than 10. The extra bottom row of pixels is used to encode the width of each glyph: under the first glyph there are five black pixels, therefore the width of that glyph is 5 pixels; under the second glyph there are five white pixels thus its width is 5 pixels again, and so on until the end of the bitmap. | ||
+ | The structure of the translation table is even simpler: looking at the file '' | ||
+ | |||
+ | Code point '' | ||
+ | |||
+ | Once the font has been drawn and the translation table written it's the time to actually build the font object using the '' | ||
+ | < | ||
+ | bmp2font < | ||
+ | </ | ||
+ | where | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' |