diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2018-05-23 11:48:35 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2018-05-23 11:48:35 +0100 |
commit | a58d97a41a6192038573da6862571dc72a560458 (patch) | |
tree | 0efc128007ea0afcc931dede3521012b19723d9f /include/netsurf/plot_style.h | |
parent | 6cabd4cd628833afa32aeb7c614ef153b4a1c985 (diff) | |
download | netsurf-a58d97a41a6192038573da6862571dc72a560458.tar.gz netsurf-a58d97a41a6192038573da6862571dc72a560458.tar.bz2 |
Plotters: Add plot_style_fixed type, and use for font size.
Diffstat (limited to 'include/netsurf/plot_style.h')
-rw-r--r-- | include/netsurf/plot_style.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/netsurf/plot_style.h b/include/netsurf/plot_style.h index 30db3663e..db5a5ee26 100644 --- a/include/netsurf/plot_style.h +++ b/include/netsurf/plot_style.h @@ -36,8 +36,14 @@ /** Transparent colour value. */ #define NS_TRANSPARENT 0x01000000 -/** Scaling factor for font sizes */ -#define FONT_SIZE_SCALE 1024 +/** 22:10 fixed point */ +#define PLOT_STYLE_RADIX (10) + +/** Scaling factor for plot styles */ +#define PLOT_STYLE_SCALE (1 << PLOT_STYLE_RADIX) + +/* type for fixed point numbers */ +typedef int32_t plot_style_fixed; /** * Type of plot operation @@ -90,7 +96,7 @@ typedef enum { */ typedef struct plot_font_style { plot_font_generic_family_t family; /**< Generic family to plot with */ - int size; /**< Font size, in points * FONT_SIZE_SCALE */ + plot_style_fixed size; /**< Font size, in pt */ int weight; /**< Font weight: value in range [100,900] as per CSS */ plot_font_flags_t flags; /**< Font flags */ colour background; /**< Background colour to blend to, if appropriate */ |