[type1] MM fonts support exactly zero named instances (#48748). * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/ChangeLog b/ChangeLog
index 904fd8e..60438b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-09-06 Werner Lemberg <wl@gnu.org>
+
+ [type1] MM fonts support exactly zero named instances (#48748).
+
+ * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
+
2016-09-06 Jonathan Kew <jfkthame@gmail.com>
[cff] Fix uninitialized memory.
diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h
index 6c05f0c..b5d6858 100644
--- a/include/freetype/ftmm.h
+++ b/include/freetype/ftmm.h
@@ -195,11 +195,15 @@ FT_BEGIN_HEADER
/* (where every glyph could have a different */
/* number of designs). */
/* */
- /* num_namedstyles :: The number of named styles; only meaningful for */
- /* GX that allows certain design coordinates to */
- /* have a string ID (in the `name' table) */
- /* associated with them. The font can tell the */
- /* user that, for example, Weight=1.5 is `Bold'. */
+ /* num_namedstyles :: The number of named styles; a `named style' is */
+ /* a tuple of design coordinates that has a string */
+ /* ID (in the `name' table) associated with it. */
+ /* The font can tell the user that, for example, */
+ /* [Weight=1.5,Width=1.1] is `Bold'. */
+ /* */
+ /* For Type 1 Multiple Masters fonts, this value */
+ /* is always zero because the format does not */
+ /* support named styles. */
/* */
/* axis :: An axis descriptor table. */
/* GX fonts contain slightly more data than MM. */
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index f8bf313..e728cf4 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -321,7 +321,7 @@
mmvar->num_axis = mmaster.num_axis;
mmvar->num_designs = mmaster.num_designs;
- mmvar->num_namedstyles = ~0U; /* Does not apply */
+ mmvar->num_namedstyles = 0; /* Not supported */
mmvar->axis = (FT_Var_Axis*)&mmvar[1];
/* Point to axes after MM_Var struct */
mmvar->namedstyle = NULL;