Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. --------------------------------------------------------------------------------
  2.   Usage Instructions for Framebuffer NetSurf                  2nd October 2010
  3. --------------------------------------------------------------------------------
  4.  
  5.   This document provides usage instructions for the Framebuffer version of
  6.   NetSurf.
  7.  
  8.   Framebuffer NetSurf has been tested on Ubuntu and Debian.
  9.  
  10. Overview
  11. ========
  12.  
  13.   What it is
  14.   ----------
  15.  
  16.   The NetSurf framebuffer front end is primarily intended for kiosk
  17.    and embedded applications where there is insufficient Operating
  18.    System support for a full graphical windowing environment.
  19.  
  20.   The framebuffer frontend features:
  21.  
  22.   * A trivial occluded rectangle window management toolkit
  23.  
  24.   * Font handling system using either:
  25.     - A trivial internal monochrome bitmap glyph set.
  26.     - An interface to fully anti-aliased glyphs using libfreetype 2
  27.  
  28.   * Uses libnsfb to provide transparent support for:
  29.     - Numerous surface providers allowing usage on Linux, X, SDL, VNC
  30.       and any mapped linear memory region.
  31.     - Surface depths of 8, 16, 24 and 32bpp
  32.     - Optimised software plotters for lines, rectangles, polygons,
  33.       arbitrary ellipses (including circles), cubic and quadratic
  34.       splines, font glyphs and 32bpp RGBA bitmaps.
  35.     - Abstracted input handling.
  36.  
  37.   What it is not
  38.   --------------
  39.  
  40.   The framebuffer frontend is not a replacement for full native
  41.    ports. It lacks functionality and flexibility compared to such
  42.    implementations.
  43.  
  44.   Limitations include:
  45.     - Single window interface.
  46.     - No tabbed interface.
  47.     - Expects to control the entire plotting surface.
  48.     - No ability to re-size a surface after initialisation.
  49.     - Inflexible input character mapping.
  50.     - Limited history view.
  51.  
  52.   In addition it should be noted support for some libnsfb surfaces has
  53.    been implemented purely for debugging functionality (SDL
  54.    especially) and is not intended to replace native surface
  55.    handlers.
  56.  
  57.   If a high level windowing system is available then a native NetSurf
  58.    frontend is almost certainly a better choice than attempting to use
  59.    the framebuffer frontend.
  60.  
  61.   If there is a graphical environment which supports GTK then using
  62.    the GTK frontend is a vastly superior choice. The framebuffer
  63.    frontend will appear exceptionally limited on such capable systems.
  64.  
  65.  
  66. Configuring
  67. ===========
  68.  
  69.   Several resources are set at *compile* time and are not changeable at
  70.    run time such as the icon bitmaps, the font system to use and what
  71.    default surface to use. Refer to the BUILDING-Framebuffer document
  72.    for details.
  73.  
  74.   Toolkit Options
  75.   ---------------
  76.  
  77.   The trivial toolkit has some configuration parameters allowing the
  78.    user to alter specific aspects of the UI. All the sizes are in
  79.    surface pixels however that is mapped.
  80.  
  81.   fb_furniture_size
  82.     This is the size allowed for the scroll bar elements.
  83.  
  84.   fb_toolbar_size
  85.     The height of the toolbar.
  86.  
  87.   fb_toolbar_layout
  88.     The layout of the toolbar, layout uses a string to define buttons
  89.     type and position each character adds an element to the toolbar:
  90.  
  91.     b - back
  92.     l - local history
  93.     f - forward
  94.     s - stop
  95.     r - refresh
  96.     u - url bar expands to fit remaining space
  97.     t - throbber/activity indicator
  98.     c - close the current window
  99.  
  100.     The default layout is "blfsrut" there should be no more than a
  101.     single url bar entry. If the option is set to the empty string (no
  102.     spaces permitted) the toolbar is disabled altogether.
  103.  
  104.   fb_osk
  105.     Whether the on screen keyboard should be enabled for input.
  106.  
  107.  
  108.   Framebuffer Surface
  109.   -------------------
  110.  
  111.   There are four command line switches which override compiled in
  112.    defaults these are:
  113.  
  114.   -f <handler>  
  115.      Selects a surface handler to pass to libnsfb instead of the
  116.      default. (e.g. x, sdl, mem, linux)
  117.  
  118.   -b <depth>
  119.      Selects the pixel depth to pass to libnsfb instead of the
  120.      compiled in default. (one of 8, 16, 24, 32)
  121.  
  122.   -w <width>
  123.      Selects the surface width to pass to libnsfb instead of the
  124.      compiled in default.
  125.  
  126.   -h <height>
  127.      Selects the surface height to pass to libnsfb instead of the
  128.      compiled in default.
  129.  
  130.   As with any NetSurf frontend run-time configuration is read from a
  131.    "Choices-fb" file. This file is a simple key:value list. In addition
  132.    to the standard values supported by the NetSurf core there are a
  133.    number of values to control specific aspects of the framebuffer
  134.    version.
  135.  
  136.   The libnsfb surface parameters are controlled with:
  137.  
  138.     fb_refresh - The refresh rate (for physical displays)
  139.     fb_depth - The depth (in bits per pixel) of the surface
  140.     fb_device - The path to the device (for physical displays)
  141.     fb_input_devpath - The path to the input devices (for linux input layer)
  142.     fb_input_glob - The input device selection glob  (for linux input layer)
  143.     window_width - The width of the framebuffer
  144.     window_height - The height of the framebuffer
  145.  
  146.   The defaults are for 800 by 600 pixels at 16bpp and 70Hz refresh rate.
  147.  
  148.   The documentation of libnsfb should be consulted for further
  149.    information about supported surfaces and their configuration.
  150.  
  151.   Fonts
  152.   -----
  153.  
  154.   If the compile time option is set to use the freetype font system
  155.    then several configuration options are available. If the simple
  156.    bitmap glyphs are used none of these options apply.
  157.  
  158.   Font faces are provided for the css default styles of sans serif,
  159.    serif, monospace, cursive and fantasy. Only the sans serif
  160.    non-italic normal weight font is required to exist, If any of the
  161.    other faces are missing the sans serif font will be used instead.
  162.  
  163.   The compiled in default font file paths are specified within the
  164.   build time Makefile.config. The default faces is the truetype DejaVu
  165.   font set in the directory /usr/share/fonts/truetype/ttf-dejavu/
  166.  
  167.   The font glyphs are, by default, rendered as 256 level transparency
  168.    which gives excellent visual results even on small font sizes.
  169.  
  170.   The font selection may be changed by placing truetype font files
  171.    in the resources path. The resource files will be the generic names
  172.    sans_serif.ttf, sans_serif_bold.ttf etc.
  173.  
  174.   The font system is configured at run-time by several options:
  175.  
  176.   fb_font_monochrome
  177.     This option causes the renderer to use monochrome glyph
  178.     rendering. This method of rendering is much less visually
  179.     appealing and while faster to plot it is slower to render.
  180.  
  181.   fb_font_cachesize
  182.     This option sets the number of kilobytes of memory set aside for
  183.     caching the rendered glyphs. This caching significantly improves
  184.     the performance of using the freetype rendering system. It is set
  185.     to 2048 by default (2 Megabytes of memory) which impiracle testing
  186.     shows to be a suitable value for the seven default faces.
  187.  
  188.   The remaining options control the files to be used for font faces. The
  189.    font file name options will override both the compiled in paths and
  190.    files found in the resource path.
  191.  
  192.   fb_face_sans_serif - The sans serif face
  193.   fb_face_sans_serif_bold - The bold sans serif face
  194.   fb_face_sans_serif_italic - The italic sans serif face
  195.   fb_face_sans_serif_italic_bold - The bold italic sans serif face.
  196.   fb_face_serif - The serif font
  197.   fb_face_serif_bold - The bold serif font
  198.   fb_face_monospace - The monospaced font
  199.   fb_face_monospace_bold - The bold monospaced font
  200.   fb_face_cursive - The cursive font
  201.   fb_face_fantasy - The fantasy font
  202.