summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-10-05 20:49:02 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-10-05 20:49:02 +0000
commit9f0c232e474828b1552ecd430a237b28e8e57e7f (patch)
tree11223de78961eed1d125e9d1e1eb5bb056e1f43c /Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge
parenta3a26fc921f8182b70d96386e6d76ce051ed247f (diff)
web2c/luatexdir: Sync with the upstream trunk.
git-svn-id: svn://tug.org/texlive/trunk@38555 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge')
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c34
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c133
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c29
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h4
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/tottf.c3
5 files changed, 109 insertions, 94 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c
index 85bcd91b94f..243d4ec6a44 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c
@@ -22,7 +22,7 @@
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "fontforgevw.h"
#include <chardata.h>
@@ -1179,14 +1179,14 @@ static struct {
uint32 tag;
} localscripts[] = {
{ N_("Arabic"), CHR('a','r','a','b') },
- { N_("Aramaic"), CHR('a','r','a','m') },
+ { N_("Aramaic"), CHR('a','r','a','m') }, /* Only in ff */
{ N_("Armenian"), CHR('a','r','m','n') },
- { N_("Avestan"), CHR('a','v','e','s') },
+ { N_("Avestan"), CHR('a','v','e','s') }, /* Only in ff */
{ N_("Balinese"), CHR('b','a','l','i') },
{ N_("Batak"), CHR('b','a','t','k') },
{ N_("Bengali"), CHR('b','e','n','g') },
{ N_("Bengali2"), CHR('b','n','g','2') },
- { N_("Bliss Symbolics"), CHR('b','l','i','s') },
+ { N_("Bliss Symbolics"), CHR('b','l','i','s') }, /* Only in ff */
{ N_("Bopomofo"), CHR('b','o','p','o') },
{ N_("Brāhmī"), CHR('b','r','a','h') },
{ N_("Braille"), CHR('b','r','a','i') },
@@ -1198,11 +1198,11 @@ static struct {
{ N_("Cherokee"), CHR('c','h','a','m') },
{ N_("Cham"), CHR('c','h','a','m') },
{ N_("Cherokee"), CHR('c','h','e','r') },
- { N_("Cirth"), CHR('c','i','r','t') },
+ { N_("Cirth"), CHR('c','i','r','t') }, /* Only in ff */
{ N_("CJK Ideographic"), CHR('h','a','n','i') },
{ N_("Coptic"), CHR('c','o','p','t') },
{ N_("Cypro-Minoan"), CHR('c','p','r','t') },
- { N_("Cypriot syllabary"), CHR('c','p','m','n') },
+ { N_("Cypriot syllabary"), CHR('c','p','m','n') }, /* Only in ff */
{ N_("Cyrillic"), CHR('c','y','r','l') },
{ N_("Default"), CHR('D','F','L','T') },
{ N_("Deseret (Mormon)"), CHR('d','s','r','t') },
@@ -1242,35 +1242,35 @@ static struct {
{ N_("Latin"), CHR('l','a','t','n') },
{ N_("Lepcha (Róng)"), CHR('l','e','p','c') },
{ N_("Limbu"), CHR('l','i','m','b') }, /* Not in ISO 15924 !!!!!, just guessing */
- { N_("Linear A"), CHR('l','i','n','a') },
+ { N_("Linear A"), CHR('l','i','n','a') }, /* Only in ff */
{ N_("Linear B"), CHR('l','i','n','b') },
{ N_("Lycian"), CHR('l','y','c','i') },
{ N_("Lydian"), CHR('l','y','d','i') },
{ N_("Mandaean"), CHR('m','a','n','d') },
/* { N_("Mayan hieroglyphs"), CHR('m','a','y','a') },*/
{ N_("Malayālam"), CHR('m','l','y','m') },
- { N_("Malayālam2"), CHR('m','l','y','2') },
+ { N_("Malayālam2"), CHR('m','l','y','2') }, /* Only in ff, should be mlm2 */
{ N_("Mathematical Alphanumeric Symbols"), CHR('m','a','t','h') },
{ N_("Mongolian"), CHR('m','o','n','g') },
- { N_("Musical"), CHR('m','u','s','i') },
+ { N_("Musical"), CHR('m','u','s','i') }, /* Only in ff, should be musc */
{ N_("Myanmar"), CHR('m','y','m','r') },
{ N_("New Tai Lue"), CHR('t','a','l','u') },
{ N_("N'Ko"), CHR('n','k','o',' ') },
{ N_("Ogham"), CHR('o','g','a','m') },
{ N_("Ol Chiki"), CHR('o','l','c','k') },
{ N_("Old Italic (Etruscan, Oscan, etc.)"), CHR('i','t','a','l') },
- { N_("Old Permic"), CHR('p','e','r','m') },
+ { N_("Old Permic"), CHR('p','e','r','m') }, /* Only in ff */
{ N_("Old Persian cuneiform"), CHR('x','p','e','o') },
{ N_("Oriya"), CHR('o','r','y','a') },
{ N_("Oriya2"), CHR('o','r','y','2') },
{ N_("Osmanya"), CHR('o','s','m','a') },
- { N_("Pahlavi"), CHR('p','a','l','v') },
+ { N_("Pahlavi"), CHR('p','a','l','v') }, /* Only in ff */
{ N_("Phags-pa"), CHR('p','h','a','g') },
{ N_("Phoenician"), CHR('p','h','n','x') },
- { N_("Phaistos"), CHR('p','h','s','t') },
- { N_("Pollard Phonetic"), CHR('p','l','r','d') },
+ { N_("Phaistos"), CHR('p','h','s','t') }, /* Only in ff */
+ { N_("Pollard Phonetic"), CHR('p','l','r','d') }, /* Only in ff */
{ N_("Rejang"), CHR('r','j','n','g') },
- { N_("Rongorongo"), CHR('r','o','r','o') },
+ { N_("Rongorongo"), CHR('r','o','r','o') }, /* Only in ff */
{ N_("Runic"), CHR('r','u','n','r') },
{ N_("Saurashtra"), CHR('s','a','u','r') },
{ N_("Shavian"), CHR('s','h','a','w') },
@@ -1287,15 +1287,15 @@ static struct {
{ N_("Tamil2"), CHR('t','m','l','2') },
{ N_("Telugu"), CHR('t','e','l','u') },
{ N_("Telugu2"), CHR('t','e','l','2') },
- { N_("Tengwar"), CHR('t','e','n','g') },
+ { N_("Tengwar"), CHR('t','e','n','g') }, /* Only in ff */
{ N_("Thaana"), CHR('t','h','a','a') },
{ N_("Thai"), CHR('t','h','a','i') },
{ N_("Tibetan"), CHR('t','i','b','t') },
{ N_("Tifinagh (Berber)"), CHR('t','f','n','g') },
- { N_("Ugaritic"), CHR('u','g','r','t') }, /* Not in ISO 15924 !!!!!, just guessing */
+ { N_("Ugaritic"), CHR('u','g','r','t') }, /* Only in ff, should be ugar */
{ N_("Vai"), CHR('v','a','i',' ') },
/* { N_("Visible Speech"), CHR('v','i','s','p') },*/
- { N_("Cuneiform, Ugaritic"), CHR('x','u','g','a') },
+ { N_("Cuneiform, Ugaritic"), CHR('x','u','g','a') }, /* Only in ff */
{ N_("Yi") , CHR('y','i',' ',' ') },
/* { N_("Private Use Script 1"), CHR('q','a','a','a') },*/
/* { N_("Private Use Script 2"), CHR('q','a','a','b') },*/
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
index 92efbc7800f..0a79633f11e 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
@@ -938,7 +938,7 @@ return;
free(tabs);
fseek(ttf,restore_this_pos,SEEK_SET);
}
-
+
static struct tablenames { uint32 tag; char *name; } stdtables[] = {
{ CHR('a','c','n','t'), N_("accent attachment table") },
{ CHR('a','v','a','r'), N_("axis variation table") },
@@ -1546,7 +1546,7 @@ static char *FindLangEntry(struct ttfinfo *info, int id ) {
for ( cur=info->names; cur!=NULL && cur->names[id]==NULL; cur=cur->next );
if ( cur==NULL )
return( NULL );
- ret = copy(cur->names[id]);
+ ret = copy(cur->names[id]);
return( ret );
}
@@ -1602,7 +1602,7 @@ static void readttfcopyrights(FILE *ttf,struct ttfinfo *info) {
name = getushort(ttf);
str_len = getushort(ttf);
stroff = getushort(ttf);
-
+
TTFAddLangStr(ttf,info,name,str_len,tableoff+stroff,
platform,specific,language);
}
@@ -2114,11 +2114,11 @@ return( sc );
LogError(_("Bad glyph (%d), its definition extends beyond the space allowed for it\n"), gid );
info->bad_glyph_data = true;
}
-
+
/* find the bb */
THPatchSplineChar(sc);
}
-
+
return( sc );
}
@@ -3669,20 +3669,30 @@ static void cidfigure(struct ttfinfo *info, struct topdicts *dict,
/*info->map = encmap = EncMapNew(info->glyph_cnt,info->glyph_cnt,&custom);*/
for ( j=0; subdicts[j]!=NULL; ++j );
- info->subfontcnt = j;
+ info->subfontcnt = j;
info->subfonts = gcalloc(j+1,sizeof(SplineFont *));
for ( j=0; subdicts[j]!=NULL; ++j ) {
- info->subfonts[j] = cffsffillup(subdicts[j],strings,scnt,info);
- info->subfonts[j]->map = encmap;
+ info->subfonts[j] = cffsffillup(subdicts[j],strings,scnt,info);
+ info->subfonts[j]->map = encmap;
+ info->subfonts[j]->glyphmin = -1;
}
+ /* here we also deal with glyphmin */
+
for ( i=0; i<info->glyph_cnt; ++i ) {
- sf = info->subfonts[ fdselect[i] ];
- cid = dict->charset[i];
- if ( cid>=sf->glyphcnt ) sf->glyphcnt = sf->glyphmax = cid+1;
- /*if ( cid>=encmap->enccount ) encmap->enccount = cid+1;*/
+ sf = info->subfonts[ fdselect[i] ];
+ cid = dict->charset[i];
+ if ( cid>=sf->glyphcnt ) {
+ if (sf->glyphmin == -1) {
+ sf->glyphmin = cid;
+ }
+ sf->glyphcnt = sf->glyphmax = cid+1;
+ }
+ /*if ( cid>=encmap->enccount )
+ encmap->enccount = cid+1;*/
}
for ( j=0; subdicts[j]!=NULL; ++j )
- info->subfonts[j]->glyphs = gcalloc(info->subfonts[j]->glyphcnt,sizeof(SplineChar *));
+ info->subfonts[j]->glyphs = gcalloc(info->subfonts[j]->glyphcnt,sizeof(SplineChar *));
+
/*encmap->encmax = encmap->enccount;*/
/*encmap->map = galloc(encmap->enccount*sizeof(int));*/
/*memset(encmap->map,-1,encmap->enccount*sizeof(int));*/
@@ -3697,49 +3707,46 @@ static void cidfigure(struct ttfinfo *info, struct topdicts *dict,
map = FindCidMap(info->cidregistry,info->ordering,info->supplement,NULL);
for ( i=0; i<info->glyph_cnt; ++i ) {
- j = fdselect[i];
- sf = info->subfonts[ j ];
-/* The format allows for some dicts that are type1 strings and others that */
-/* are type2s. Which means that the global subrs will have a different bias */
-/* as we flip from font to font. So we can't set the bias when we read in */
-/* the subrs but must wait until we know which font we're working on. */
- cstype = subdicts[j]->charstringtype;
- pscontext.is_type2 = cstype-1;
- pscontext.painttype = subdicts[j]->painttype;
- gsubrs->bias = cstype==1 ? 0 :
- gsubrs->cnt < 1240 ? 107 :
- gsubrs->cnt <33900 ? 1131 : 32768;
- subrs = &subdicts[j]->local_subrs;
- subrs->bias = cstype==1 ? 0 :
- subrs->cnt < 1240 ? 107 :
- subrs->cnt <33900 ? 1131 : 32768;
-
- cid = dict->charset[i];
- /*encmap->map[cid] = cid;*/
- uni = CID2NameUni(map,cid,buffer,sizeof(buffer));
- info->chars[i] = PSCharStringToBB(
- dict->glyphs.values[i], dict->glyphs.lens[i],&pscontext,
- subrs,gsubrs,buffer);
- info->chars[i]->vwidth = sf->ascent+sf->descent;
- info->chars[i]->unicodeenc = uni;
- sf->glyphs[cid] = info->chars[i];
- sf->glyphs[cid]->parent = sf;
- sf->glyphs[cid]->orig_pos = cid; /* Bug! should be i, but I assume sf->chars[orig_pos]->orig_pos==orig_pos */
- if ( sf->glyphs[cid]->layers[ly_fore].refs!=NULL )
- IError( "Reference found in CID font. Can't fix it up");
-
+ j = fdselect[i];
+ sf = info->subfonts[j];
+ /* The format allows for some dicts that are type1 strings and others that */
+ /* are type2s. Which means that the global subrs will have a different bias */
+ /* as we flip from font to font. So we can't set the bias when we read in */
+ /* the subrs but must wait until we know which font we're working on. */
+ cstype = subdicts[j]->charstringtype;
+ pscontext.is_type2 = cstype-1;
+ pscontext.painttype = subdicts[j]->painttype;
+ gsubrs->bias = cstype==1 ? 0 :
+ gsubrs->cnt < 1240 ? 107 :
+ gsubrs->cnt <33900 ? 1131 : 32768;
+ subrs = &subdicts[j]->local_subrs;
+ subrs->bias = cstype==1 ? 0 :
+ subrs->cnt < 1240 ? 107 :
+ subrs->cnt <33900 ? 1131 : 32768;
+ cid = dict->charset[i];
+ /*encmap->map[cid] = cid;*/
+ uni = CID2NameUni(map,cid,buffer,sizeof(buffer));
+ info->chars[i] = PSCharStringToBB(
+ dict->glyphs.values[i], dict->glyphs.lens[i],&pscontext,
+ subrs,gsubrs,buffer);
+ info->chars[i]->vwidth = sf->ascent+sf->descent;
+ info->chars[i]->unicodeenc = uni;
+ sf->glyphs[cid] = info->chars[i];
+ sf->glyphs[cid]->parent = sf;
+ sf->glyphs[cid]->orig_pos = i; /* fixed in 0.80.1 */
+ if ( sf->glyphs[cid]->layers[ly_fore].refs!=NULL )
+ IError( "Reference found in CID font. Can't fix it up");
THPatchSplineChar(sf->glyphs[cid]);
-
- if ( cstype==2 ) {
- if ( sf->glyphs[cid]->width == (int16) 0x8000 )
- sf->glyphs[cid]->width = subdicts[j]->defaultwidthx;
- else
- sf->glyphs[cid]->width += subdicts[j]->nominalwidthx;
- }
- ff_progress_next();
+ if ( cstype==2 ) {
+ if ( sf->glyphs[cid]->width == (int16) 0x8000 )
+ sf->glyphs[cid]->width = subdicts[j]->defaultwidthx;
+ else
+ sf->glyphs[cid]->width += subdicts[j]->nominalwidthx;
+ }
+ ff_progress_next();
}
/* No need to do a reference fixup here-- the chars aren't associated */
- /* with any encoding as is required for seac */
+ /* with any encoding as is required for seac */
}
static int readcffglyphs(FILE *ttf,struct ttfinfo *info) {
@@ -3857,7 +3864,7 @@ static int readtyp1glyphs(FILE *ttf,struct ttfinfo *info) {
i = 0;
fseek(ttf,info->typ1_start+i,SEEK_SET);
}
-
+
tmp = tmpfile();
for ( i=0; i<(int)info->typ1_length; ++i )
putc(getc(ttf),tmp);
@@ -3892,7 +3899,7 @@ return( true );
}
return( false );
}
-
+
static void readttfwidths(FILE *ttf,struct ttfinfo *info) {
int i,j;
int lastwidth = info->emsize, lsb;
@@ -3936,7 +3943,7 @@ static void readttfwidths(FILE *ttf,struct ttfinfo *info) {
LogError( _("Invalid ttf hmtx table (or hhea), numOfLongMetrics is 0\n") );
info->bad_metrics = true;
}
-
+
for ( j=i; j<info->glyph_cnt; ++j ) {
if ( (sc = info->chars[j])!=NULL ) { /* In a ttc file we may skip some */
sc->width = lastwidth;
@@ -4701,7 +4708,7 @@ return;
} else if ( format==2 ) {
int max_sub_head_key = 0, cnt, max_pos= -1;
struct subhead *subheads;
-
+
for ( i=0; i<256; ++i ) {
table[i] = getushort(ttf)/8; /* Sub-header keys */
if ( table[i]>max_sub_head_key ) {
@@ -5703,7 +5710,7 @@ static SplineFont *SFFillFromTTF(struct ttfinfo *info) {
SplineChar *sc;
struct ttf_table *last[2], *tab, *next;
-
+
sf = SplineFontEmpty();
sf->display_size = -default_fv_font_size;
#ifdef LUA_FF_LIB
@@ -5861,7 +5868,7 @@ static SplineFont *SFFillFromTTF(struct ttfinfo *info) {
sf->layers = info->layers;
sf->layer_cnt = info->layer_cnt;
}
-
+
for ( i=0; i<info->glyph_cnt; ++i ) if ( info->chars[i]!=NULL ) {
SCOrderAP(info->chars[i]);
@@ -5982,12 +5989,12 @@ return( 0 );
return( true );
}
-/* I am not sure what happens to the ttinfo struct's members.
+/* I am not sure what happens to the ttinfo struct's members.
perhaps some need free()-ing
*/
-void THPatchSplineChar (SplineChar *sc)
-{
+void THPatchSplineChar (SplineChar *sc)
+{
DBounds bb;
if (sc->layers!=NULL && sc->layers[ly_fore].splines != NULL) {
if (sc->xmax==0 && sc->ymax==0 && sc->xmin==0 && sc->ymin==0) {
@@ -6006,7 +6013,7 @@ void THPatchSplineChar (SplineChar *sc)
sc->layers[ly_fore].refs = NULL;
}
}
-
+
static SplineFont *SFFillFromTTFInfo(struct ttfinfo *info) {
SplineFont *sf ;
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c
index 97974e3baf5..85114e1213d 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c
@@ -447,7 +447,7 @@ static void addPairPos(struct ttfinfo *info, int glyph1, int glyph2,
uint32 base,FILE *ttf) {
(void)ttf; /* for -Wall */
(void)l; /* for -Wall */
- (void)base; /* for -Wall */
+ (void)base; /* for -Wall */
if ( glyph1<info->glyph_cnt && glyph2<info->glyph_cnt ) {
PST *pos = chunkalloc(sizeof(PST));
pos->type = pst_pair;
@@ -1727,7 +1727,7 @@ return;
}
static void gposContextSubTable(FILE *ttf, int stoffset,
- struct ttfinfo *info, struct lookup *l, struct lookup_subtable *subtable,
+ struct ttfinfo *info, struct lookup *l, struct lookup_subtable *subtable,
struct lookup *alllooks) {
switch( getushort(ttf)) {
case 1:
@@ -1743,7 +1743,7 @@ static void gposContextSubTable(FILE *ttf, int stoffset,
}
static void gposChainingSubTable(FILE *ttf, int stoffset,
- struct ttfinfo *info, struct lookup *l, struct lookup_subtable *subtable,
+ struct ttfinfo *info, struct lookup *l, struct lookup_subtable *subtable,
struct lookup *alllooks) {
switch( getushort(ttf)) {
case 1:
@@ -2570,10 +2570,10 @@ static void gposExtensionSubTable(FILE *ttf, int stoffset,
switch ( lu_type ) {
case 1:
gposSimplePos(ttf,st,info,l,subtable);
- break;
+ break;
case 2:
gposKernSubTable(ttf,st,info,l,subtable);
- break;
+ break;
case 3:
gposCursiveSubTable(ttf,st,info,l,subtable);
break;
@@ -2657,10 +2657,10 @@ static void gposLookupSwitch(FILE *ttf, int st,
switch ( l->type | 0x100 ) {
case gpos_single:
gposSimplePos(ttf,st,info,l,subtable);
- break;
+ break;
case gpos_pair:
gposKernSubTable(ttf,st,info,l,subtable);
- break;
+ break;
case gpos_cursive:
gposCursiveSubTable(ttf,st,info,l,subtable);
break;
@@ -2838,17 +2838,24 @@ void readttfgdef(FILE *ttf,struct ttfinfo *info) {
int coverage, cnt, i,j, format;
uint16 *glyphs, *lc_offsets, *offsets;
uint32 caret_base;
+ uint32 version;
PST *pst;
SplineChar *sc;
fseek(ttf,info->gdef_start,SEEK_SET);
- if ( getlong(ttf)!=0x00010000 )
-return;
+
+ version = getlong(ttf) ;
+ if (version != 0x00010000 && version != 0x00010002)
+ return;
+
info->g_bounds = info->gdef_start + info->gdef_length;
gclass = getushort(ttf);
/* attach list = */ getushort(ttf);
lclo = getushort(ttf); /* ligature caret list */
- mac = getushort(ttf); /* mark attach class */
+ mac = getushort(ttf); /* mark attach class */
+
+ if (version == 0x00010002)
+ getushort(ttf); /* class defs */
if ( gclass!=0 ) {
uint16 *gclasses = getClassDefTable(ttf,info->gdef_start+gclass, info);
@@ -3614,7 +3621,7 @@ void readttfbase(FILE *ttf,struct ttfinfo *info) {
struct Base *curBase;
struct basescript *curScript, *last;
struct baselangextent *cur, *lastLang;
-
+
if ( info->base_start==0 )
return;
fseek(ttf,info->base_start,SEEK_SET);
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h
index edb726e0657..ccee275e015 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h
@@ -771,7 +771,7 @@ typedef struct bdfprops {
typedef struct bdffont {
struct splinefont *sf;
- int glyphcnt, glyphmax; /* used & allocated sizes of glyphs array */
+ int glyphcnt, glyphmax,glyphmin; /* used & allocated sizes of glyphs array */
BDFChar **glyphs; /* an array of charcnt entries */
int16 pixelsize;
int16 ascent, descent;
@@ -1484,7 +1484,7 @@ typedef struct splinefont {
struct splinefont *next;
int ascent, descent;
int uniqueid; /* Not copied when reading in!!!! */
- int glyphcnt, glyphmax; /* allocated size of glyphs array */
+ int glyphcnt, glyphmax,glyphmin; /* allocated size of glyphs array */
SplineChar **glyphs;
unsigned int changed: 1;
unsigned int changed_since_autosave: 1;
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/tottf.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/tottf.c
index 89a0da5860b..3a1f02c273e 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/tottf.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/tottf.c
@@ -480,6 +480,7 @@ return;
sf->glyphs = gcalloc(max,sizeof(SplineChar *));
sf->glyphcnt = sf->glyphmax = max;
+ sf->glyphmin = 0;
for ( k=0; k<sf->subfontcnt; ++k )
for ( i=0; i<sf->subfonts[k]->glyphcnt; ++i ) if ( sf->subfonts[k]->glyphs[i]!=NULL )
sf->glyphs[i] = sf->subfonts[k]->glyphs[i];
@@ -1896,7 +1897,7 @@ static int dumpcff(struct alltabs *at,SplineFont *sf,enum fontformat format,
SFDummyUpCIDs(&at->gi,sf); /* life is easier if we ignore the seperate fonts of a cid keyed fonts and treat it as flat */
ret = dumpcidglyphs(sf,at);
free(sf->glyphs); sf->glyphs = NULL;
- sf->glyphcnt = sf->glyphmax = 0;
+ sf->glyphcnt = sf->glyphmax = sf->glyphmin = 0;
}
free( at->gi.bygid );