Skip to content

Commit

Permalink
Use enTable to create glyf + loca tables
Browse files Browse the repository at this point in the history
  • Loading branch information
RoelN committed Nov 17, 2020
1 parent 385846b commit 1751887
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions add_glyphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
from fontTools.ttLib.tables import otTables
from fontTools.pens.ttGlyphPen import TTGlyphPen
from fontTools.ttLib.tables._c_m_a_p import CmapSubtable
from fontTools.ttLib.tables import _g_l_y_f
from fontTools.ttLib.tables import _l_o_c_a
from fontTools.ttLib import newTable

import add_emoji_gsub
import add_aliases
Expand Down Expand Up @@ -172,8 +171,8 @@ def add_glyph_data(font, seqs, seq_to_advance, vadvance, add_glyf):
if add_glyf:
pen = TTGlyphPen(None)
empty_glyph = pen.glyph()
font['loca'] = _l_o_c_a.table__l_o_c_a()
font['glyf'] = glyf_table = _g_l_y_f.table__g_l_y_f()
font['loca'] = newTable("loca")
font['glyf'] = glyf_table = newTable("glyf")
glyf_table.glyphOrder = font.getGlyphOrder()
glyf_table.glyphs = {g:empty_glyph for g in glyf_table.glyphOrder}

Expand Down

0 comments on commit 1751887

Please sign in to comment.