From 84a0a629888215a3a4c4949e5116a6de333aaa34 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 7 Oct 2010 23:56:36 +0000 Subject: Clean up framebuffer compile time font selection Make framebuffer font documentation match reality Expose glyph cache size as a configuration option svn path=/trunk/netsurf/; revision=10871 --- Docs/BUILDING-Framebuffer | 34 +++++++++++++++++++++++++++------- Docs/USING-Framebuffer | 44 ++++++++++++++++++++++++++++++++------------ 2 files changed, 59 insertions(+), 19 deletions(-) (limited to 'Docs') diff --git a/Docs/BUILDING-Framebuffer b/Docs/BUILDING-Framebuffer index b6583df71..0eccca82e 100644 --- a/Docs/BUILDING-Framebuffer +++ b/Docs/BUILDING-Framebuffer @@ -79,26 +79,46 @@ The font glyphs are, by default, rendered as 256 level transparency which gives excellent visual results even on small font sizes. - The default font is the Vera trutype font set. The default path they - are sourced from is /usr/share/fonts/truetype/ttf-bitstream-vera/ . + The default font is the DejaVu trutype font set. The default path they + are sourced from is /usr/share/fonts/truetype/ttf-dejavu/ . + + The compiled in default paths may be altered by setting values in + the user configuration makefile Makefile.config. These values must + be set to teh absolute path of the relevant font file including its + .ttf extension. The variables are: + + NETSURF_FB_FONT_SANS_SERIF + NETSURF_FB_FONT_SANS_SERIF_BOLD + NETSURF_FB_FONT_SANS_SERIF_ITALIC + NETSURF_FB_FONT_SANS_SERIF_ITALIC_BOLD + NETSURF_FB_FONT_SERIF + NETSURF_FB_FONT_SERIF_BOLD + NETSURF_FB_FONT_MONOSPACE + NETSURF_FB_FONT_MONOSPACE_BOLD + NETSURF_FB_FONT_CURSIVE + NETSURF_FB_FONT_FANTASY + The font selection may be changed by placing truetype font files in the resources path. The resource files will be the generic names - sans_serif.ttf, sans_serif_bold.ttf etc. The selection may also be - overridden by setting options. + sans_serif.ttf, sans_serif_bold.ttf etc. The font system is configured at runtime by several options. The fb_font_monochrome option causes the renderer to use monochrome glyph rendering which is faster to plot but slower to render and - much less visually appealing. The remaining seven options control - the files to be used for font faces. + much less visually appealing. + + The remaining seven options control the files to be used for font faces. fb_face_sans_serif - The sans serif face fb_face_sans_serif_bold - The bold sans serif face fb_face_sans_serif_italic - The italic sans serif face fb_face_sans_serif_italic_bold - The bold italic sans serif face. - fb_face_monospace - The monospaced font fb_face_serif - The serif font fb_serif_bold - The bold serif font + fb_face_monospace - The monospaced font + fb_face_monospace_bold - The bold monospaced font + fb_face_cursive - The cursive font + fb_face_fantasy - The fantasy font Old Freetype -------------- diff --git a/Docs/USING-Framebuffer b/Docs/USING-Framebuffer index e63d47ae2..6a1f2b53a 100644 --- a/Docs/USING-Framebuffer +++ b/Docs/USING-Framebuffer @@ -155,27 +155,47 @@ Configuring then several configuration options are available. If the simple bitmap glyphs are used none of these options apply. + Font faces are provided for the css default styles of sans serif, + serif, monospace, cursive and fantasy. Only the sans serif + non-italic normal weight font is required to exist, If any of the + other faces are missing the sans serif font will be used instead. + + The compiled in default font file paths are specified within the + build time Makefile.config. The default faces is the truetype DejaVu + font set in the directory /usr/share/fonts/truetype/ttf-dejavu/ + The font glyphs are, by default, rendered as 256 level transparency which gives excellent visual results even on small font sizes. - The default font is the Vera truetype font set. The default path they - are sourced from is /usr/share/fonts/truetype/ttf-bitstream-vera/ . - The font selection may be changed by placing truetype font files in the resources path. The resource files will be the generic names - sans_serif.ttf, sans_serif_bold.ttf etc. The selection may also be - overridden by setting options. + sans_serif.ttf, sans_serif_bold.ttf etc. + + The font system is configured at run-time by several options: - The font system is configured at run-time by several options. The - fb_font_monochrome option causes the renderer to use monochrome - glyph rendering which is faster to plot but slower to render and - much less visually appealing. The remaining seven options control - the files to be used for font faces. + fb_font_monochrome + This option causes the renderer to use monochrome glyph + rendering. This method of rendering is much less visually + appealing and while faster to plot it is slower to render. + + fb_font_cachesize + This option sets the number of kilobytes of memory set aside for + caching the rendered glyphs. This caching significantly improves + the performance of using the freetype rendering system. It is set + to 2048 by default (2 Megabytes of memory) which impiracle testing + shows to be a suitable value for the seven default faces. + + The remaining options control the files to be used for font faces. The + font file name options will override both the compiled in paths and + files found in the resource path. fb_face_sans_serif - The sans serif face fb_face_sans_serif_bold - The bold sans serif face fb_face_sans_serif_italic - The italic sans serif face fb_face_sans_serif_italic_bold - The bold italic sans serif face. - fb_face_monospace - The monospaced font fb_face_serif - The serif font - fb_serif_bold - The bold serif font + fb_face_serif_bold - The bold serif font + fb_face_monospace - The monospaced font + fb_face_monospace_bold - The bold monospaced font + fb_face_cursive - The cursive font + fb_face_fantasy - The fantasy font -- cgit v1.2.3