subset: don't drop SVG table, add WIP subset/svg.py stub
simply pass-through for now
This commit is contained in:
parent
425e1afd36
commit
bd47bdae97
@ -10,6 +10,7 @@ from fontTools.pens.basePen import NullPen
|
|||||||
from fontTools.misc.loggingTools import Timer
|
from fontTools.misc.loggingTools import Timer
|
||||||
from fontTools.subset.util import _add_method, _uniq_sort
|
from fontTools.subset.util import _add_method, _uniq_sort
|
||||||
from fontTools.subset.cff import *
|
from fontTools.subset.cff import *
|
||||||
|
from fontTools.subset.svg import *
|
||||||
import sys
|
import sys
|
||||||
import struct
|
import struct
|
||||||
import array
|
import array
|
||||||
@ -207,12 +208,12 @@ Font table options:
|
|||||||
Specify (=), add to (+=) or exclude from (-=) the comma-separated
|
Specify (=), add to (+=) or exclude from (-=) the comma-separated
|
||||||
set of tables that will be be dropped.
|
set of tables that will be be dropped.
|
||||||
By default, the following tables are dropped:
|
By default, the following tables are dropped:
|
||||||
'BASE', 'JSTF', 'DSIG', 'EBDT', 'EBLC', 'EBSC', 'SVG ', 'PCLT', 'LTSH'
|
'BASE', 'JSTF', 'DSIG', 'EBDT', 'EBLC', 'EBSC', 'PCLT', 'LTSH'
|
||||||
and Graphite tables: 'Feat', 'Glat', 'Gloc', 'Silf', 'Sill'.
|
and Graphite tables: 'Feat', 'Glat', 'Gloc', 'Silf', 'Sill'.
|
||||||
The tool will attempt to subset the remaining tables.
|
The tool will attempt to subset the remaining tables.
|
||||||
Examples:
|
Examples:
|
||||||
--drop-tables-='SVG '
|
--drop-tables-='BASE'
|
||||||
* Drop the default set of tables but keep 'SVG '.
|
* Drop the default set of tables but keep 'BASE'.
|
||||||
--drop-tables+=GSUB
|
--drop-tables+=GSUB
|
||||||
* Drop the default set of tables and 'GSUB'.
|
* Drop the default set of tables and 'GSUB'.
|
||||||
--drop-tables=DSIG
|
--drop-tables=DSIG
|
||||||
@ -2486,7 +2487,7 @@ class Options(object):
|
|||||||
|
|
||||||
# spaces in tag names (e.g. "SVG ", "cvt ") are stripped by the argument parser
|
# spaces in tag names (e.g. "SVG ", "cvt ") are stripped by the argument parser
|
||||||
_drop_tables_default = ['BASE', 'JSTF', 'DSIG', 'EBDT', 'EBLC',
|
_drop_tables_default = ['BASE', 'JSTF', 'DSIG', 'EBDT', 'EBLC',
|
||||||
'EBSC', 'SVG', 'PCLT', 'LTSH']
|
'EBSC', 'PCLT', 'LTSH']
|
||||||
_drop_tables_default += ['Feat', 'Glat', 'Gloc', 'Silf', 'Sill'] # Graphite
|
_drop_tables_default += ['Feat', 'Glat', 'Gloc', 'Silf', 'Sill'] # Graphite
|
||||||
_no_subset_tables_default = ['avar', 'fvar',
|
_no_subset_tables_default = ['avar', 'fvar',
|
||||||
'gasp', 'head', 'hhea', 'maxp',
|
'gasp', 'head', 'hhea', 'maxp',
|
||||||
|
7
Lib/fontTools/subset/svg.py
Normal file
7
Lib/fontTools/subset/svg.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
from fontTools.subset.util import _add_method
|
||||||
|
from fontTools import ttLib
|
||||||
|
|
||||||
|
|
||||||
|
@_add_method(ttLib.getTableClass("SVG "))
|
||||||
|
def subset_glyphs(self, s):
|
||||||
|
return True # XXX
|
Loading…
x
Reference in New Issue
Block a user