Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/2988193e44c183542a8f7cf52dc63f76ec3c5249
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/2988193e44c183542a8f7cf52dc63f76ec3c5249
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/2988193e44c183542a8f7cf52dc63f76ec3c5249

The branch, master has been updated
       via  2988193e44c183542a8f7cf52dc63f76ec3c5249 (commit)
      from  c5a84e17f78ff82d98af155c9d075e7b0f4978cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commitdiff/2988193e44c183542a8f7cf52dc63f76ec3c5249
commit 2988193e44c183542a8f7cf52dc63f76ec3c5249
Author: Ole Loots <[email protected]>
Commit: Ole Loots <[email protected]>

    Documented font loading / font names.

diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c
index 8eb15e2..ad21d0f 100755
--- a/atari/plot/font_freetype.c
+++ b/atari/plot/font_freetype.c
@@ -18,6 +18,7 @@
  */
 
 #ifdef WITH_FREETYPE_FONT_DRIVER
+
 #include <ft2build.h>
 #include FT_CACHE_H
 
@@ -25,12 +26,52 @@
 #include "atari/plot/plot.h"
 #include "atari/plot/font_freetype.h"
 #include "atari/findfile.h"
-
+
+/* -------------------------------------------------------------------------- 
*/
+/*  Font Loading & Mapping scheme                                             
*/
+/* -------------------------------------------------------------------------- 
*/
+/*
+
+Truetype fonts are loaded in the following priority order:
+
+1. Option values.
+2. default resouce names (8.3 compatible).
+3. default font package installation path.
+
+
+Resource font names & their meanings:
+--------------------------------------------
+s.ttf          => Serif
+sb.ttf         => Serif Bold
+ss.ttf                 => Sans Serif                                   
*Default Font
+ssb.ttf        => Sans Serif Bold
+ssi.ttf        => Sans Serif Italic
+ssib.ttf       => Sans Serif Italic Bold
+mono.ttf       => Monospaced
+monob.ttf      => Monospaced Bold
+cursive.ttf    => Cursive
+fantasy.ttf => Fantasy
+*/
+
+       /* Cursive */
+       font_faces[FONT_FACE_CURSIVE] =
+                       ft_new_face(nsoption_charp(atari_face_cursive),
+                            "fonts/cursive.ttf",
+                            DEJAVU_PATH"DejaVuSansMono-Oblique.ttf");
+
+       /* Fantasy */
+       font_faces[FONT_FACE_FANTASY] =
+                       ft_new_face(nsoption_charp(atari_face_fantasy),
+                            "fonts/fantasy.ttf",
+
+
+
 #define DEJAVU_PATH "/usr/share/fonts/truetype/ttf-dejavu/"
+
 #define CACHE_SIZE 2048
 #define CACHE_MIN_SIZE (100 * 1024)
 #define BOLD_WEIGHT 700
-
+
 extern css_fixed nscss_screen_dpi;
 
 extern unsigned long atari_plot_flags;


-----------------------------------------------------------------------

Summary of changes:
 atari/plot/font_freetype.c |   45 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c
index 8eb15e2..ad21d0f 100755
--- a/atari/plot/font_freetype.c
+++ b/atari/plot/font_freetype.c
@@ -18,6 +18,7 @@
  */
 
 #ifdef WITH_FREETYPE_FONT_DRIVER
+
 #include <ft2build.h>
 #include FT_CACHE_H
 
@@ -25,12 +26,52 @@
 #include "atari/plot/plot.h"
 #include "atari/plot/font_freetype.h"
 #include "atari/findfile.h"
-
+
+/* -------------------------------------------------------------------------- 
*/
+/*  Font Loading & Mapping scheme                                             
*/
+/* -------------------------------------------------------------------------- 
*/
+/*
+
+Truetype fonts are loaded in the following priority order:
+
+1. Option values.
+2. default resouce names (8.3 compatible).
+3. default font package installation path.
+
+
+Resource font names & their meanings:
+--------------------------------------------
+s.ttf          => Serif
+sb.ttf         => Serif Bold
+ss.ttf                 => Sans Serif                                   
*Default Font
+ssb.ttf        => Sans Serif Bold
+ssi.ttf        => Sans Serif Italic
+ssib.ttf       => Sans Serif Italic Bold
+mono.ttf       => Monospaced
+monob.ttf      => Monospaced Bold
+cursive.ttf    => Cursive
+fantasy.ttf => Fantasy
+*/
+
+       /* Cursive */
+       font_faces[FONT_FACE_CURSIVE] =
+                       ft_new_face(nsoption_charp(atari_face_cursive),
+                            "fonts/cursive.ttf",
+                            DEJAVU_PATH"DejaVuSansMono-Oblique.ttf");
+
+       /* Fantasy */
+       font_faces[FONT_FACE_FANTASY] =
+                       ft_new_face(nsoption_charp(atari_face_fantasy),
+                            "fonts/fantasy.ttf",
+
+
+
 #define DEJAVU_PATH "/usr/share/fonts/truetype/ttf-dejavu/"
+
 #define CACHE_SIZE 2048
 #define CACHE_MIN_SIZE (100 * 1024)
 #define BOLD_WEIGHT 700
-
+
 extern css_fixed nscss_screen_dpi;
 
 extern unsigned long atari_plot_flags;


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to