summaryrefslogtreecommitdiff
path: root/framebuffer/fbtk
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-05-06 21:31:05 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-05-06 21:31:05 +0100
commit4cbc56ebc103e1b8302a4b710309e3af6a553ffc (patch)
tree7baf6129d4580ffd915b44974b751e026eb9e9c9 /framebuffer/fbtk
parentd67504677b9316dd0401b58e9cec8d7908a329cd (diff)
downloadnetsurf-4cbc56ebc103e1b8302a4b710309e3af6a553ffc.tar.gz
netsurf-4cbc56ebc103e1b8302a4b710309e3af6a553ffc.tar.bz2
Add Unicode support to internal font.
+ Now contains more glpyhs (was previously limited to cp-1252). + When a glyph is unavailable, the codepoint is now rendered. + Added glyph data file. + Added converter to generate the font's .c file from the data. TODO: The generated file is currently checked into the repo, but it should be generated as part of the build process, in the build-* directory. To update the generated source file, first build the converter: $ gcc -O2 -Wall framebuffer/convert_font.c -lm \ -o build-Linux-framebuffer/tools/convert_font And then use it to generate the souce file: $ build-Linux-framebuffer/tools/convert_font \ framebuffer/res/fonts/glyph_data \ framebuffer/GEN_font_internal.c -v The converter's usage is: convert_font [options] <in_file> <out_file> See convert_font --help for more details.
Diffstat (limited to 'framebuffer/fbtk')
-rw-r--r--framebuffer/fbtk/text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/framebuffer/fbtk/text.c b/framebuffer/fbtk/text.c
index a4562289b..b05271b44 100644
--- a/framebuffer/fbtk/text.c
+++ b/framebuffer/fbtk/text.c
@@ -66,7 +66,7 @@ fb_text_font_style(fbtk_widget_t *widget, int *font_height, int *padding,
*padding += widget->height / 6;
*font_height = widget->height - *padding - *padding;
#else
- *font_height = font_regular.height;
+ *font_height = FB_FONT_HEIGHT;
*padding = (widget->height - *padding - *font_height) / 2;
#endif