summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2012-12-17 02:11:32 -0800
committerSteve Kondik <shade@chemlab.org>2012-12-17 02:53:55 -0800
commitbad440fe256381ba38f6435984476f96dce7ba56 (patch)
tree18c1e172c6a4b3760e79fa3b68713eb7835c5cdb /src/base
parentd4c5fd17a70b96e793bf2c5c6cadfe4a219e5833 (diff)
downloadandroid_external_freetype-bad440fe256381ba38f6435984476f96dce7ba56.tar.gz
android_external_freetype-bad440fe256381ba38f6435984476f96dce7ba56.tar.bz2
android_external_freetype-bad440fe256381ba38f6435984476f96dce7ba56.zip
* Not currently useful, and causes CTS failure. This reverts commit 4d3876eef9f90a75f2ae55e880759937482e6b3f. Change-Id: I1914f8c79e773399d1590011e6db1d63d7be36a8
Diffstat (limited to 'src/base')
-rw-r--r--src/base/ftlcdfil.c46
-rw-r--r--src/base/ftobjs.c69
-rw-r--r--src/base/ftoutln.c22
-rw-r--r--src/base/ftsynth.c27
4 files changed, 3 insertions, 161 deletions
diff --git a/src/base/ftlcdfil.c b/src/base/ftlcdfil.c
index 09a9551..0da4ba1 100644
--- a/src/base/ftlcdfil.c
+++ b/src/base/ftlcdfil.c
@@ -21,9 +21,6 @@
#include FT_IMAGE_H
#include FT_INTERNAL_OBJECTS_H
-#include <math.h>
-#include <string.h>
-#include <strings.h>
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
@@ -290,51 +287,10 @@
{ 0x00, 0x55, 0x56, 0x55, 0x00 };
/* the values here sum up to a value larger than 256, */
/* providing a cheap gamma correction */
- static FT_Byte default_filter[5] =
+ static const FT_Byte default_filter[5] =
{ 0x10, 0x40, 0x70, 0x40, 0x10 };
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- int checked_filter_params_env = 0;
- if ( checked_filter_params_env == 0 )
- {
- char *filter_params = getenv( "INFINALITY_FT_FILTER_PARAMS" );
- if ( filter_params != NULL && strcmp(filter_params, "") != 0 )
- {
- float f1, f2, f3, f4, f5;
- if ( strcasecmp(filter_params, "default" ) != 0)
- {
- int args_assigned = 0;
- args_assigned = sscanf ( filter_params, "%f %f %f %f %f", &f1, &f2, &f3, &f4, &f5 );
-
- if ( args_assigned == 5 )
- {
- if ( f1 + f2 + f3 + f4 + f5 > 5 )
- {
- /* Assume we were given integers instead of floats */
- /* 0 to 100 */
- default_filter[0] = (FT_Byte) (f1 * 2.55f + 0.5f);
- default_filter[1] = (FT_Byte) (f2 * 2.55f + 0.5f);
- default_filter[2] = (FT_Byte) (f3 * 2.55f + 0.5f);
- default_filter[3] = (FT_Byte) (f4 * 2.55f + 0.5f);
- default_filter[4] = (FT_Byte) (f5 * 2.55f + 0.5f);
- }
- else
- {
- /* Assume we were given floating point values */
- /* 0 to 1.0 */
- default_filter[0] = (FT_Byte) (f1 * 255.0f + 0.5f);
- default_filter[1] = (FT_Byte) (f2 * 255.0f + 0.5f);
- default_filter[2] = (FT_Byte) (f3 * 255.0f + 0.5f);
- default_filter[3] = (FT_Byte) (f4 * 255.0f + 0.5f);
- default_filter[4] = (FT_Byte) (f5 * 255.0f + 0.5f);
- }
- }
- }
- }
- checked_filter_params_env = 1;
- }
-#endif
if ( !library )
return FT_Err_Invalid_Argument;
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 66a199a..36ee797 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -513,22 +513,6 @@
ft_lookup_glyph_renderer( FT_GlyphSlot slot );
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- static void
- ft_glyphslot_enlarge_metrics( FT_GlyphSlot slot,
- FT_Render_Mode mode )
- {
- FT_Glyph_Metrics* metrics = &slot->metrics;
- FT_Pos enlarge_cbox = 0;
- /* enlarge for grayscale rendering */
- if ( mode == FT_RENDER_MODE_NORMAL ) enlarge_cbox = 64;
-
- metrics->horiBearingX -= enlarge_cbox;
- metrics->width += 2*enlarge_cbox;
- }
-#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */
-
-
#ifdef GRID_FIT_METRICS
static void
ft_glyphslot_grid_fit_metrics( FT_GlyphSlot slot,
@@ -587,33 +571,8 @@
FT_Bool autohint = FALSE;
FT_Module hinter;
TT_Face ttface = (TT_Face)face;
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- int checked_use_various_tweaks_env = FALSE;
- FT_Bool use_various_tweaks = FALSE;
-
- if ( !checked_use_various_tweaks_env )
- {
- char *use_various_tweaks_env = getenv( "INFINALITY_FT_USE_VARIOUS_TWEAKS" );
- if ( use_various_tweaks_env != NULL )
- {
- if ( strcasecmp(use_various_tweaks_env, "default" ) != 0 )
- {
- if ( strcasecmp(use_various_tweaks_env, "true") == 0) use_various_tweaks = TRUE;
- else if ( strcasecmp(use_various_tweaks_env, "1") == 0) use_various_tweaks = TRUE;
- else if ( strcasecmp(use_various_tweaks_env, "on") == 0) use_various_tweaks = TRUE;
- else if ( strcasecmp(use_various_tweaks_env, "yes") == 0) use_various_tweaks = TRUE;
- }
- }
- checked_use_various_tweaks_env = 1;
- }
- /* Force autohint if no tt instructions */
- if ( use_various_tweaks &&
- ttface->num_locations &&
- ttface->max_profile.maxSizeOfInstructions == 0 )
- load_flags |= FT_LOAD_FORCE_AUTOHINT;
-#endif
if ( !face || !face->size || !face->glyph )
return FT_Err_Invalid_Face_Handle;
@@ -693,18 +652,8 @@
if ( autohint )
{
FT_AutoHinter_Service hinting;
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- if ( use_various_tweaks )
- {
- /* Force slight hinting over full hinting always */
- load_flags &= ~FT_LOAD_TARGET_LCD;
- load_flags &= ~FT_LOAD_TARGET_LCD_V;
- load_flags &= ~FT_LOAD_TARGET_MONO;
- load_flags &= ~FT_LOAD_TARGET_NORMAL;
- load_flags |= FT_LOAD_TARGET_LIGHT;
- /*printf("%d ", load_flags);*/
- }
-#endif
+
+
/* try to load embedded bitmaps first if available */
/* */
/* XXX: This is really a temporary hack that should disappear */
@@ -742,10 +691,6 @@
}
else
{
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- char* c1 = "CUR_WIDTH";
- char* c2 = "0";
-#endif
error = driver->clazz->load_glyph( slot,
face->size,
glyph_index,
@@ -753,16 +698,6 @@
if ( error )
goto Exit;
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- setenv(c1, c2, 1);
-
- {
- /* fix for sdl_ttf */
- FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags );
- ft_glyphslot_enlarge_metrics( slot, mode );
- }
-#endif
-
if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
{
/* check that the loaded outline is correct */
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index fa4ee0d..76e2b04 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -897,29 +897,7 @@
FT_Vector v_prev, v_first, v_next, v_cur;
FT_Int c, n, first;
FT_Int orientation;
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- int checked_use_various_tweaks_env = 0;
- FT_Bool use_various_tweaks = FALSE;
- if ( checked_use_various_tweaks_env == 0 )
- {
- char *use_various_tweaks_env = getenv( "INFINALITY_FT_USE_VARIOUS_TWEAKS" );
- if ( use_various_tweaks_env != NULL )
- {
- if ( strcasecmp(use_various_tweaks_env, "default" ) != 0 )
- {
- if ( strcasecmp(use_various_tweaks_env, "true") == 0) use_various_tweaks = TRUE;
- else if ( strcasecmp(use_various_tweaks_env, "1") == 0) use_various_tweaks = TRUE;
- else if ( strcasecmp(use_various_tweaks_env, "on") == 0) use_various_tweaks = TRUE;
- else if ( strcasecmp(use_various_tweaks_env, "yes") == 0) use_various_tweaks = TRUE;
- }
- }
- checked_use_various_tweaks_env = 1;
- }
-
- if ( use_various_tweaks )
- ystrength = FT_PIX_FLOOR ( ystrength );
-#endif
if ( !outline )
return FT_Err_Invalid_Argument;
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index b186d8d..81e2ed2 100644
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -88,26 +88,7 @@
FT_Face face = slot->face;
FT_Error error;
FT_Pos xstr, ystr;
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- int checked_use_various_tweaks_env = 0;
- FT_Bool use_various_tweaks = FALSE;
- if ( checked_use_various_tweaks_env == 0 )
- {
- char *use_various_tweaks_env = getenv( "INFINALITY_FT_USE_VARIOUS_TWEAKS" );
- if ( use_various_tweaks_env != NULL )
- {
- if ( strcasecmp(use_various_tweaks_env, "default" ) != 0 )
- {
- if ( strcasecmp(use_various_tweaks_env, "true") == 0) use_various_tweaks = TRUE;
- else if ( strcasecmp(use_various_tweaks_env, "1") == 0) use_various_tweaks = TRUE;
- else if ( strcasecmp(use_various_tweaks_env, "on") == 0) use_various_tweaks = TRUE;
- else if ( strcasecmp(use_various_tweaks_env, "yes") == 0) use_various_tweaks = TRUE;
- }
- }
- checked_use_various_tweaks_env = 1;
- }
-#endif
if ( slot->format != FT_GLYPH_FORMAT_OUTLINE &&
slot->format != FT_GLYPH_FORMAT_BITMAP )
@@ -120,11 +101,6 @@
if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
{
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- if ( use_various_tweaks )
- (void)FT_Outline_EmboldenXY( &slot->outline, xstr, FT_PIX_FLOOR( ystr ) );
- else
-#endif
/* ignore error */
(void)FT_Outline_EmboldenXY( &slot->outline, xstr, ystr );
}
@@ -165,9 +141,6 @@
slot->metrics.width += xstr;
slot->metrics.height += ystr;
-#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET
- /*if ( !use_various_tweaks ) */
-#endif
slot->metrics.horiAdvance += xstr;
slot->metrics.vertAdvance += ystr;