summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2017-02-18 10:43:10 +0100
committerWerner Lemberg <wl@gnu.org>2017-02-18 10:43:10 +0100
commitd22f5ec56304540fe5bc8be147150e39c5078778 (patch)
treef5d61cd34f2e4848d93f48a9052a542339954155 /src
parent467b026cd509b497c2d8bfd2ce350b62466f6964 (diff)
downloadfreetype2-d22f5ec56304540fe5bc8be147150e39c5078778.tar.gz
Formatting.
Diffstat (limited to 'src')
-rw-r--r--src/cff/cffdrivr.c1
-rw-r--r--src/cff/cffobjs.c76
-rw-r--r--src/cff/cffobjs.h7
-rw-r--r--src/cff/cfftypes.h1
4 files changed, 39 insertions, 46 deletions
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index c0466d0c0..fe28574ba 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -833,6 +833,7 @@
{
FT_UInt* hinting_engine = (FT_UInt*)value;
+
if ( *hinting_engine == FT_CFF_HINTING_ADOBE
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
|| *hinting_engine == FT_CFF_HINTING_FREETYPE
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index a63935002..f0320afa4 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -684,62 +684,56 @@
}
#endif /* FT_DEBUG_LEVEL_TRACE */
-
-
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-
- {
- FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
-
- FT_Int instance_index = face_index >> 16;
-
-
- if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
- mm &&
- instance_index > 0 )
{
- FT_MM_Var* mm_var;
-
+ FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
- error = mm->get_mm_var( cffface, NULL );
- if ( error )
- goto Exit;
+ FT_Int instance_index = face_index >> 16;
- mm->get_var_blend( cffface, NULL, NULL, &mm_var );
- if ( mm_var->namedstyle )
+ if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
+ mm &&
+ instance_index > 0 )
{
- FT_Var_Named_Style* named_style;
- FT_String* style_name;
+ FT_MM_Var* mm_var;
- /* in `face_index', the instance index starts with value 1 */
- named_style = mm_var->namedstyle + instance_index - 1;
- error = sfnt->get_name( face,
- (FT_UShort)named_style->strid,
- &style_name );
+ error = mm->get_mm_var( cffface, NULL );
if ( error )
goto Exit;
- /* set style name; if already set, replace it */
- if ( face->root.style_name )
- FT_FREE( face->root.style_name );
- face->root.style_name = style_name;
+ mm->get_var_blend( cffface, NULL, NULL, &mm_var );
- /* finally, select the named instance */
- error = mm->set_var_design( cffface,
- mm_var->num_axis,
- named_style->coords );
- if ( error )
- goto Exit;
+ if ( mm_var->namedstyle )
+ {
+ FT_Var_Named_Style* named_style;
+ FT_String* style_name;
+
+
+ /* in `face_index', the instance index starts with value 1 */
+ named_style = mm_var->namedstyle + instance_index - 1;
+ error = sfnt->get_name( face,
+ (FT_UShort)named_style->strid,
+ &style_name );
+ if ( error )
+ goto Exit;
+
+ /* set style name; if already set, replace it */
+ if ( face->root.style_name )
+ FT_FREE( face->root.style_name );
+ face->root.style_name = style_name;
+
+ /* finally, select the named instance */
+ error = mm->set_var_design( cffface,
+ mm_var->num_axis,
+ named_style->coords );
+ if ( error )
+ goto Exit;
+ }
}
}
- }
-
#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
-
-
if ( !dict->has_font_matrix )
dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;
@@ -1022,7 +1016,6 @@
cffface->style_flags = flags;
}
-
#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
/* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */
/* has unset this flag because of the 3.0 `post' table. */
@@ -1033,7 +1026,6 @@
if ( dict->cid_registry != 0xFFFFU && pure_cff )
cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;
-
/*******************************************************************/
/* */
/* Compute char maps. */
diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h
index 5d26977dc..2b88e0e70 100644
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -118,10 +118,9 @@ FT_BEGIN_HEADER
{
FT_DriverRec root;
- FT_UInt hinting_engine;
- FT_Bool no_stem_darkening;
-
- FT_Int darken_params[8];
+ FT_UInt hinting_engine;
+ FT_Bool no_stem_darkening;
+ FT_Int darken_params[8];
} CFF_DriverRec;
diff --git a/src/cff/cfftypes.h b/src/cff/cfftypes.h
index 412712c86..0c24ed500 100644
--- a/src/cff/cfftypes.h
+++ b/src/cff/cfftypes.h
@@ -389,6 +389,7 @@ FT_BEGIN_HEADER
/* since version 2.4.12 */
FT_Generic cf2_instance;
+ /* since version 2.7.1 */
CFF_VStoreRec vstore; /* parsed vstore structure */
} CFF_FontRec;