forked from pool/freetype2
5bd93ea7e5
Update to version 2.5.1 OBS-URL: https://build.opensuse.org/request/show/209891 OBS-URL: https://build.opensuse.org/package/show/M17N/freetype2?expand=0&rev=80
187 lines
5.6 KiB
Diff
187 lines
5.6 KiB
Diff
From 23d47f17fdb963fb0722a4ad2d9eb8fd150aba5a Mon Sep 17 00:00:00 2001
|
|
From: Werner Lemberg <wl@gnu.org>
|
|
Date: Wed, 27 Nov 2013 09:23:44 +0000
|
|
Subject: [ftgrid] Fix compilation in non-debug mode.
|
|
|
|
* src/ftgrid.c: Guard autofit dump functions with FT_DEBUG_AUTOFIT
|
|
clause.
|
|
Update prototypes.
|
|
(grid_hint_draw_segment): Guard with FT_DEBUG_AUTOFIT clause.
|
|
(grid_status_draw_outline): Guard call to `grid_hint_draw_segment'
|
|
with FT_DEBUG_AUTOFIT clause.
|
|
(Process_Event) <'1'>, <'2'>, <'3'>: Don't mess around with trace
|
|
levels, which should always stay internal to the FreeType library.
|
|
Update calls to dump functions.
|
|
---
|
|
diff --git a/ChangeLog b/ChangeLog
|
|
index 2cd9331..676a7db 100644
|
|
--- a/ChangeLog
|
|
+++ b/ChangeLog
|
|
@@ -1,3 +1,17 @@
|
|
+2013-11-27 Werner Lemberg <wl@gnu.org>
|
|
+
|
|
+ [ftgrid] Fix compilation in non-debug mode.
|
|
+
|
|
+ * src/ftgrid.c: Guard autofit dump functions with FT_DEBUG_AUTOFIT
|
|
+ clause.
|
|
+ Update prototypes.
|
|
+ (grid_hint_draw_segment): Guard with FT_DEBUG_AUTOFIT clause.
|
|
+ (grid_status_draw_outline): Guard call to `grid_hint_draw_segment'
|
|
+ with FT_DEBUG_AUTOFIT clause.
|
|
+ (Process_Event) <'1'>, <'2'>, <'3'>: Don't mess around with trace
|
|
+ levels, which should always stay internal to the FreeType library.
|
|
+ Update calls to dump functions.
|
|
+
|
|
2013-11-25 Werner Lemberg <wl@gnu.org>
|
|
|
|
* Version 2.5.1 released.
|
|
diff --git a/src/ftgrid.c b/src/ftgrid.c
|
|
index e5967e6..37e168f 100644
|
|
--- a/src/ftgrid.c
|
|
+++ b/src/ftgrid.c
|
|
@@ -47,6 +47,7 @@
|
|
#define N_CFF_HINTING_ENGINES 2
|
|
|
|
|
|
+#ifdef FT_DEBUG_AUTOFIT
|
|
/* these variables, structures and declarations are for */
|
|
/* communication with the debugger in the autofit module; */
|
|
/* normal programs don't need this */
|
|
@@ -62,11 +63,14 @@
|
|
extern "C" {
|
|
#endif
|
|
extern void
|
|
- af_glyph_hints_dump_segments( AF_GlyphHints hints );
|
|
+ af_glyph_hints_dump_segments( AF_GlyphHints hints,
|
|
+ FT_Bool to_stdout );
|
|
extern void
|
|
- af_glyph_hints_dump_points( AF_GlyphHints hints );
|
|
+ af_glyph_hints_dump_points( AF_GlyphHints hints,
|
|
+ FT_Bool to_stdout );
|
|
extern void
|
|
- af_glyph_hints_dump_edges( AF_GlyphHints hints );
|
|
+ af_glyph_hints_dump_edges( AF_GlyphHints hints,
|
|
+ FT_Bool to_stdout );
|
|
extern FT_Error
|
|
af_glyph_hints_get_num_segments( AF_GlyphHints hints,
|
|
FT_Int dimension,
|
|
@@ -80,6 +84,8 @@
|
|
}
|
|
#endif
|
|
|
|
+#endif /* FT_DEBUG_AUTOFIT */
|
|
+
|
|
typedef struct GridStatusRec_
|
|
{
|
|
int width;
|
|
@@ -263,6 +269,8 @@
|
|
}
|
|
|
|
|
|
+#ifdef FT_DEBUG_AUTOFIT
|
|
+
|
|
static void
|
|
grid_hint_draw_segment( GridStatus st,
|
|
AF_GlyphHints hints )
|
|
@@ -305,6 +313,8 @@
|
|
}
|
|
}
|
|
|
|
+#endif /* FT_DEBUG_AUTOFIT */
|
|
+
|
|
|
|
static void
|
|
ft_bitmap_draw( FT_Bitmap* bitmap,
|
|
@@ -491,6 +501,7 @@
|
|
|
|
FTDemo_Get_Size( handle, &size );
|
|
|
|
+#ifdef FT_DEBUG_AUTOFIT
|
|
/* Draw segment before drawing glyph. */
|
|
if ( status.do_segment )
|
|
{
|
|
@@ -508,6 +519,7 @@
|
|
|
|
_af_debug_disable_horz_hints = !st->do_horz_hints;
|
|
_af_debug_disable_vert_hints = !st->do_vert_hints;
|
|
+#endif
|
|
|
|
if ( FT_Load_Glyph( size->face, st->Num,
|
|
handle->load_flags | FT_LOAD_NO_BITMAP ) )
|
|
@@ -849,67 +861,28 @@
|
|
break;
|
|
|
|
#ifdef FT_DEBUG_AUTOFIT
|
|
- /* we use some internal FreeType functions and variables */
|
|
- /* to manipulate the trace level for the dumping functions */
|
|
-
|
|
case grKEY( '1' ):
|
|
if ( handle->hinted && handle->autohint )
|
|
{
|
|
- if ( FT_Trace_Get_Count() )
|
|
- {
|
|
- int old_trace_level = ft_trace_levels[trace_afhints];
|
|
-
|
|
-
|
|
- ft_trace_levels[trace_afhints] = 7;
|
|
- status.header = "dumping glyph edges to stdout";
|
|
- af_glyph_hints_dump_edges( _af_debug_hints );
|
|
- ft_trace_levels[trace_afhints] = old_trace_level;
|
|
- }
|
|
- else
|
|
- status.header = "need FreeType tracing support for dumping";
|
|
+ status.header = "dumping glyph edges to stdout";
|
|
+ af_glyph_hints_dump_edges( _af_debug_hints, 1 );
|
|
}
|
|
- else
|
|
- status.header = "need autofit mode for edge dumping";
|
|
break;
|
|
|
|
case grKEY( '2' ):
|
|
if ( handle->hinted && handle->autohint )
|
|
{
|
|
- if ( FT_Trace_Get_Count() )
|
|
- {
|
|
- int old_trace_level = ft_trace_levels[trace_afhints];
|
|
-
|
|
-
|
|
- ft_trace_levels[trace_afhints] = 7;
|
|
- status.header = "dumping glyph segments to stdout";
|
|
- af_glyph_hints_dump_segments( _af_debug_hints );
|
|
- ft_trace_levels[trace_afhints] = old_trace_level;
|
|
- }
|
|
- else
|
|
- status.header = "need FreeType tracing support for dumping";
|
|
+ status.header = "dumping glyph segments to stdout";
|
|
+ af_glyph_hints_dump_segments( _af_debug_hints, 1 );
|
|
}
|
|
- else
|
|
- status.header = "need autofit mode for segment dumping";
|
|
break;
|
|
|
|
case grKEY( '3' ):
|
|
if ( handle->hinted && handle->autohint )
|
|
{
|
|
- if ( FT_Trace_Get_Count() )
|
|
- {
|
|
- int old_trace_level = ft_trace_levels[trace_afhints];
|
|
-
|
|
-
|
|
- ft_trace_levels[trace_afhints] = 7;
|
|
- status.header = "dumping glyph points to stdout";
|
|
- af_glyph_hints_dump_points( _af_debug_hints );
|
|
- ft_trace_levels[trace_afhints] = old_trace_level;
|
|
- }
|
|
- else
|
|
- status.header = "need FreeType tracing support for dumping";
|
|
+ status.header = "dumping glyph points to stdout";
|
|
+ af_glyph_hints_dump_points( _af_debug_hints, 1 );
|
|
}
|
|
- else
|
|
- status.header = "need autofit mode for point dumping";
|
|
break;
|
|
#endif /* FT_DEBUG_AUTOFIT */
|
|
|
|
--
|
|
cgit v0.9.0.2
|