summaryrefslogtreecommitdiffstats
path: root/src/cff/cffdrivr.c
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-18 22:20:25 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-18 22:20:25 -0700
commit0a9d06e2b5cf75c3d6ba958026bfdf4745f576d6 (patch)
treebda73f0de3896a97ff4231e4600fccd89a3f9118 /src/cff/cffdrivr.c
parent049d6fea481044fcc000e7782e5bc7046fc70844 (diff)
downloadandroid_external_freetype-0a9d06e2b5cf75c3d6ba958026bfdf4745f576d6.tar.gz
android_external_freetype-0a9d06e2b5cf75c3d6ba958026bfdf4745f576d6.tar.bz2
android_external_freetype-0a9d06e2b5cf75c3d6ba958026bfdf4745f576d6.zip
auto import //branches/master/...@140412
Diffstat (limited to 'src/cff/cffdrivr.c')
-rw-r--r--src/cff/cffdrivr.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 68de8dc..286c0b3 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -4,7 +4,7 @@
/* */
/* OpenType font driver implementation (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,6 +38,7 @@
#include FT_SERVICE_XFREE86_NAME_H
#include FT_SERVICE_GLYPH_DICT_H
+
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
@@ -186,36 +187,39 @@
}
- FT_CALLBACK_DEF(FT_Error)
- cff_get_advances( FT_Face ftface,
+ FT_CALLBACK_DEF( FT_Error )
+ cff_get_advances( FT_Face face,
FT_UInt start,
FT_UInt count,
- FT_UInt flags,
+ FT_Int32 flags,
FT_Fixed* advances )
{
- CFF_Face face = (CFF_Face) ftface;
FT_UInt nn;
- FT_Error error = 0;
- FT_GlyphSlot slot = face->root.glyph;
+ FT_Error error = CFF_Err_Ok;
+ FT_GlyphSlot slot = face->glyph;
+
flags |= FT_LOAD_ADVANCE_ONLY;
- for (nn = 0; nn < count; nn++)
+ for ( nn = 0; nn < count; nn++ )
{
- error = Load_Glyph( slot, face->root.size, start+nn, flags );
- if (error) break;
+ error = Load_Glyph( slot, face->size, start + nn, flags );
+ if ( error )
+ break;
- advances[nn] = (flags & FT_LOAD_VERTICAL_LAYOUT)
- ? slot->advance.y
- : slot->advance.x;
+ advances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT )
+ ? slot->linearVertAdvance
+ : slot->linearHoriAdvance;
}
+
return error;
}
- /*
- * GLYPH DICT SERVICE
- *
- */
+
+ /*
+ * GLYPH DICT SERVICE
+ *
+ */
static FT_Error
cff_get_glyph_name( CFF_Face face,
@@ -376,6 +380,7 @@
static const FT_Service_PsInfoRec cff_service_ps_info =
{
(PS_GetFontInfoFunc) cff_ps_get_font_info,
+ (PS_GetFontExtraFunc) NULL,
(PS_HasGlyphNamesFunc) cff_ps_has_glyph_names,
(PS_GetFontPrivateFunc)NULL /* unsupported with CFF fonts */
};
@@ -421,6 +426,7 @@
cmap_info->language = 0;
+ cmap_info->format = 0;
if ( cmap->clazz != &cff_cmap_encoding_class_rec &&
cmap->clazz != &cff_cmap_unicode_class_rec )