summaryrefslogtreecommitdiffstats
path: root/src/truetype/ttsubpix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/truetype/ttsubpix.c')
-rw-r--r--src/truetype/ttsubpix.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/truetype/ttsubpix.c b/src/truetype/ttsubpix.c
index 9871994..dbda4d9 100644
--- a/src/truetype/ttsubpix.c
+++ b/src/truetype/ttsubpix.c
@@ -4,7 +4,7 @@
/* */
/* TrueType Subpixel Hinting. */
/* */
-/* Copyright 2010-2013 by */
+/* Copyright 2010-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -63,8 +63,8 @@
/* rules below. A blank entry "" is required at the end of these! */
#define FAMILY_CLASS_RULES_SIZE 7
- static const SPH_Font_Class FAMILY_CLASS_Rules
- [FAMILY_CLASS_RULES_SIZE] =
+ static const SPH_Font_Class FAMILY_CLASS_Rules
+ [FAMILY_CLASS_RULES_SIZE] =
{
{ "MS Legacy Fonts",
{ "Aharoni",
@@ -223,8 +223,8 @@
/* rules below. A blank entry "" is required at the end of these! */
#define STYLE_CLASS_RULES_SIZE 5
- const SPH_Font_Class STYLE_CLASS_Rules
- [STYLE_CLASS_RULES_SIZE] =
+ static const SPH_Font_Class STYLE_CLASS_Rules
+ [STYLE_CLASS_RULES_SIZE] =
{
{ "Regular Class",
{ "Regular",
@@ -279,18 +279,18 @@
/* Force special legacy fixes for fonts. */
#define COMPATIBILITY_MODE_RULES_SIZE 1
- const SPH_TweakRule COMPATIBILITY_MODE_Rules
- [COMPATIBILITY_MODE_RULES_SIZE] =
+ static const SPH_TweakRule COMPATIBILITY_MODE_Rules
+ [COMPATIBILITY_MODE_RULES_SIZE] =
{
- { "-", 0, "", 0 },
+ { "Verdana Clones", 0, "", 0 },
};
/* Don't do subpixel (ignore_x_mode) hinting; do normal hinting. */
#define PIXEL_HINTING_RULES_SIZE 2
- const SPH_TweakRule PIXEL_HINTING_Rules
- [PIXEL_HINTING_RULES_SIZE] =
+ static const SPH_TweakRule PIXEL_HINTING_Rules
+ [PIXEL_HINTING_RULES_SIZE] =
{
/* these characters are almost always safe */
{ "Courier New", 12, "Italic", 'z' },
@@ -301,8 +301,8 @@
/* Subpixel hinting ignores SHPIX rules on X. Force SHPIX for these. */
#define DO_SHPIX_RULES_SIZE 1
- const SPH_TweakRule DO_SHPIX_Rules
- [DO_SHPIX_RULES_SIZE] =
+ static const SPH_TweakRule DO_SHPIX_Rules
+ [DO_SHPIX_RULES_SIZE] =
{
{ "-", 0, "", 0 },
};
@@ -312,8 +312,8 @@
/* boundary and don't move that point to a Y pixel boundary. */
#define SKIP_NONPIXEL_Y_MOVES_RULES_SIZE 4
- const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules
- [SKIP_NONPIXEL_Y_MOVES_RULES_SIZE] =
+ static const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules
+ [SKIP_NONPIXEL_Y_MOVES_RULES_SIZE] =
{
/* fix vwxyz thinness*/
{ "Consolas", 0, "", 0 },
@@ -328,8 +328,8 @@
#define SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1
- const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions
- [SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =
+ static const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions
+ [SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =
{
/* Fixes < and > */
{ "Courier New", 0, "Regular", 0 },
@@ -340,8 +340,8 @@
/* boundary and don't move that point to a Y pixel boundary. */
#define SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE 2
- const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_DELTAP_Rules
- [SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE] =
+ static const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_DELTAP_Rules
+ [SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE] =
{
/* Maintain thickness of diagonal in 'N' */
{ "Times New Roman", 0, "Regular/Bold Class", 'N' },
@@ -352,8 +352,8 @@
/* Skip Y moves that move a point off a Y pixel boundary. */
#define SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE 1
- const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules
- [SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE] =
+ static const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules
+ [SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE] =
{
{ "-", 0, "", 0 },
};
@@ -361,8 +361,8 @@
#define SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1
- const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules_Exceptions
- [SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =
+ static const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules_Exceptions
+ [SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =
{
{ "-", 0, "", 0 },
};
@@ -371,8 +371,8 @@
/* Round moves that don't move a point to a Y pixel boundary. */
#define ROUND_NONPIXEL_Y_MOVES_RULES_SIZE 2
- const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules
- [ROUND_NONPIXEL_Y_MOVES_RULES_SIZE] =
+ static const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules
+ [ROUND_NONPIXEL_Y_MOVES_RULES_SIZE] =
{
/* Droid font instructions don't snap Y to pixels */
{ "Droid Sans", 0, "Regular/Italic Class", 0 },
@@ -382,8 +382,8 @@
#define ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1
- const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions
- [ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =
+ static const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions
+ [ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =
{
{ "-", 0, "", 0 },
};
@@ -392,8 +392,8 @@
/* Allow a Direct_Move along X freedom vector if matched. */
#define ALLOW_X_DMOVE_RULES_SIZE 1
- const SPH_TweakRule ALLOW_X_DMOVE_Rules
- [ALLOW_X_DMOVE_RULES_SIZE] =
+ static const SPH_TweakRule ALLOW_X_DMOVE_Rules
+ [ALLOW_X_DMOVE_RULES_SIZE] =
{
/* Fixes vanishing diagonal in 4 */
{ "Verdana", 0, "Regular", '4' },
@@ -403,8 +403,8 @@
/* Return MS rasterizer version 35 if matched. */
#define RASTERIZER_35_RULES_SIZE 8
- const SPH_TweakRule RASTERIZER_35_Rules
- [RASTERIZER_35_RULES_SIZE] =
+ static const SPH_TweakRule RASTERIZER_35_Rules
+ [RASTERIZER_35_RULES_SIZE] =
{
/* This seems to be the only way to make these look good */
{ "Times New Roman", 0, "Regular", 'i' },
@@ -421,8 +421,8 @@
/* Don't round to the subpixel grid. Round to pixel grid. */
#define NORMAL_ROUND_RULES_SIZE 1
- const SPH_TweakRule NORMAL_ROUND_Rules
- [NORMAL_ROUND_RULES_SIZE] =
+ static const SPH_TweakRule NORMAL_ROUND_Rules
+ [NORMAL_ROUND_RULES_SIZE] =
{
/* Fix serif thickness for certain ppems */
/* Can probably be generalized somehow */
@@ -433,8 +433,8 @@
/* Skip IUP instructions if matched. */
#define SKIP_IUP_RULES_SIZE 1
- const SPH_TweakRule SKIP_IUP_Rules
- [SKIP_IUP_RULES_SIZE] =
+ static const SPH_TweakRule SKIP_IUP_Rules
+ [SKIP_IUP_RULES_SIZE] =
{
{ "Arial", 13, "Regular", 'a' },
};
@@ -443,8 +443,8 @@
/* Skip MIAP Twilight hack if matched. */
#define MIAP_HACK_RULES_SIZE 1
- const SPH_TweakRule MIAP_HACK_Rules
- [MIAP_HACK_RULES_SIZE] =
+ static const SPH_TweakRule MIAP_HACK_Rules
+ [MIAP_HACK_RULES_SIZE] =
{
{ "Geneva", 12, "", 0 },
};
@@ -453,8 +453,8 @@
/* Skip DELTAP instructions if matched. */
#define ALWAYS_SKIP_DELTAP_RULES_SIZE 23
- const SPH_TweakRule ALWAYS_SKIP_DELTAP_Rules
- [ALWAYS_SKIP_DELTAP_RULES_SIZE] =
+ static const SPH_TweakRule ALWAYS_SKIP_DELTAP_Rules
+ [ALWAYS_SKIP_DELTAP_RULES_SIZE] =
{
{ "Georgia", 0, "Regular", 'k' },
/* fix various problems with e in different versions */
@@ -489,8 +489,8 @@
/* Always do DELTAP instructions if matched. */
#define ALWAYS_DO_DELTAP_RULES_SIZE 1
- const SPH_TweakRule ALWAYS_DO_DELTAP_Rules
- [ALWAYS_DO_DELTAP_RULES_SIZE] =
+ static const SPH_TweakRule ALWAYS_DO_DELTAP_Rules
+ [ALWAYS_DO_DELTAP_RULES_SIZE] =
{
{ "-", 0, "", 0 },
};
@@ -744,7 +744,7 @@
#endif /* FORCE_NATURAL_WIDTHS */
- FT_LOCAL_DEF( FT_Bool )
+ static FT_Bool
is_member_of_family_class( const FT_String* detected_font_name,
const FT_String* rule_font_name )
{
@@ -779,7 +779,7 @@
}
- FT_LOCAL_DEF( FT_Bool )
+ static FT_Bool
is_member_of_style_class( const FT_String* detected_font_style,
const FT_String* rule_font_style )
{
@@ -905,7 +905,7 @@
{
TT_Face face = (TT_Face)loader->face;
FT_String* family = face->root.family_name;
- int ppem = loader->size->metrics.x_ppem;
+ FT_UInt ppem = loader->size->metrics.x_ppem;
FT_String* style = face->root.style_name;