diff options
author | James Bursa <james@netsurf-browser.org> | 2006-01-29 12:20:25 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2006-01-29 12:20:25 +0000 |
commit | 87d2b7aa8e9b6e2209776a73da67398c795cbcb3 (patch) | |
tree | fac5f022fcebbfe684643055813f8489138819af /rufl.h | |
parent | 4581f7a89f79a828d161191f336a4444c8d2f9e8 (diff) | |
download | librufl-87d2b7aa8e9b6e2209776a73da67398c795cbcb3.tar.gz librufl-87d2b7aa8e9b6e2209776a73da67398c795cbcb3.tar.bz2 |
[project @ 2006-01-29 12:20:25 by bursa]
Improve handling of font weights. Now detects available weights better and supports up to 9 weights. Ignore control characters and spaces that are not spaces when scanning available characters.
svn path=/import/rufl/; revision=2470
Diffstat (limited to 'rufl.h')
-rw-r--r-- | rufl.h | 34 |
1 files changed, 14 insertions, 20 deletions
@@ -2,7 +2,7 @@ * This file is part of RUfl * Licensed under the MIT License, * http://www.opensource.org/licenses/mit-license - * Copyright 2005 James Bursa <james@semichrome.net> + * Copyright 2006 James Bursa <james@semichrome.net> */ #ifndef RUFL_H @@ -29,15 +29,22 @@ typedef enum { rufl_IO_EOF, } rufl_code; - +/** Font weight and slant. Normal weight is 400, 700 gives the "Bold" weight of + * fonts. */ typedef enum { - rufl_REGULAR = 0, - rufl_SLANTED = 1, - rufl_BOLD = 2, - rufl_BOLD_SLANTED = 3, + rufl_WEIGHT_100 = 1, + rufl_WEIGHT_200 = 2, + rufl_WEIGHT_300 = 3, + rufl_WEIGHT_400 = 4, + rufl_WEIGHT_500 = 5, + rufl_WEIGHT_600 = 6, + rufl_WEIGHT_700 = 7, + rufl_WEIGHT_800 = 8, + rufl_WEIGHT_900 = 9, + rufl_SLANTED = 0x100, } rufl_style; -/** rufl_paint(_transformed) flags */ +/** rufl_paint flags */ #define rufl_BLEND_FONT 0x01 /** Last Font Manager error. */ @@ -69,19 +76,6 @@ rufl_code rufl_paint(const char *font_family, rufl_style font_style, /** - * Render Unicode text with a transformation matrix. - * - * Only transformations which keep the x-axis direction unchanged are - * supported. - */ - -rufl_code rufl_paint_transformed(const char *font_family, rufl_style font_style, - unsigned int font_size, - const char *string, size_t length, - int x, int y, os_trfm *trfm, unsigned int flags); - - -/** * Measure the width of Unicode text. */ |