FeatureVariations
tables. Still needs to be hooked up to varLib.build
(#1240).otRound
to round floats to nearest integer towards
positive Infinity. This is now used where we deal with visual data like X/Y
coordinates, advance widths/heights, variation deltas, and similar (#1274,
#1248).SubtableStatement
to string
(#1275).OS/2.usWeightClass
and usWidthClass
, and
post.italicAngle
based on the 'wght', 'wdth' and 'slnt' axis values
(#1276, #1264).logging.lastResort
handler
on py27. Moved LastResortLogger
to the loggingTools
module (#1277).conditionSet
element to rule
element in
designspace document. Bumped format
attribute to 4.0
(previously,
it was formatted as an integer). Removed checkDefault
, checkAxes
methods, and any kind of guessing about the axes when the <axes>
element
is missing. The default master is expected at the intersection of all default
values for each axis (#1254, #1255, #1267).cvar
table when glyf
table is not
present, as is the case for CFF2 fonts.maxp.numGlyphs
when post
or
cmap
are missing.__len__
method to _TTGlyphSet
.GlyphCoordinates
never overflow signed shorts (#1230).itertools.izip
shadowing the built-in zip
.log
property of LogMixin
class (fbab12).layer
attribute to the source element,
and a corresponding layerName
attribute to the SourceDescriptor
object (#1253).
Added conditionset
element to the rule
element to the spec, but not
implemented in designspace reader/writer yet (#1254).--master-finder
command-line option (#1249).--font-number
command-line option for collections.kind
argument to T1Font constructor (c5c161c).TTFont
class, so it can be used in
with
statements to auto-close the file when exiting the context (#1232).main()
entry point, that takes positions and
prints model results.matplotlib
.ValueRecord
copy if src has more items.
We drop hinting in the subsetter by simply changing ValueFormat, without
cleaning up the actual ValueRecords. This was causing assertion error if
a variable font was subsetted without hinting and then passed directly to
the mutator for instantiation without first it saving to disk.DeviceTable
twice in VarStore optimizer
(#1206).--disable-iup
option to fonttools varLib
script,
and a optimize=True
keyword argument to varLib.build
function,
to optionally disable IUP optimization while building varfonts.F2Dot14
value, or clamp transform values that are
(almost) equal to +2.0 to make them fit and avoid decomposing (#1200,
#1204, #1205).-g
option to dump glyphs from the glyf
table
splitted as individual ttx files (#153, #1035, #1132, #1202).ufoLib.filenames
module to fontTools.misc.filenames
, used
for the ttx split-glyphs option (#1202).cvParameters
blocks in Character Variant
feautures cv01-cv99
(#860, #1169).checksum.py
script to generate/check SHA1 hash of
ttx files (#1197).gvar
phantom points
could turn up to be negative (#1198).ValueRecord
Device
objects (54fd71f).location
is no longer a
required positional argument, but an optional kewyord argument (defaults
to None
). This will make it easier to construct feature AST from
code (#1201).lib
element to the designspace as a
whole, as well as to the instance elements, to store arbitrary data in a
property list dictionary, similar to the UFO's lib
. Added an optional
font
attribute to the SourceDescriptor
, to allow operating on
in-memory font objects (#1175).-s
option (#1188).IncludedFeaNotFound
custom exception subclass, raised
when an included feature file cannot be found (#1186).VarIdxMap
to use glyph names internally instead of
glyph indexes. The old ttx dumps of HVAR/VVAR tables that contain indexes
can still be imported (21cbab8, 38a0ffb).numFonts
attribute of
SFNTReader
object (#1181).LangSysRecords
(#1180).--name-IDs
from 0 to 6 by default (#1170, #605, #114).width
module to calculate optimal CFF default and
nominal glyph widths.endchar
acting as seac
-like components
in CFF
(fixes #1162).ast.FeatureFile
object.
Added tables
argument to only build some tables instead of all (#1159,
#1163).safeEval
with ast.literal_eval
(#1139).include
statements
(#1154).ttCollection
module to read/write TrueType and
OpenType Collections. Exports a TTCollection
class with a fonts
attribute containing a list of TTFont
instances, the methods save
and saveXML
, plus some list-like methods. The importXML
method is
not implemented yet (#17).ot_tag_to_script
function that converts from
OpenType script tag to Unicode script code.designspaceLib
subpackage, originally from Erik Van Blokland's
designSpaceDocument
: https://github.com/LettError/designSpaceDocument
NOTE: this is not yet used internally by varLib, and the API may be subject
to changes (#911, #1110, LettError/designSpaceDocument#28).script_horizontal_direction
function that returns
either "LTR" or "RTL" given a unicode script code.ot_tags_from_script
function to get the list of
OpenType script tags associated with unicode script code (#1150).CapturingLogHandler.assertRegex
method, match the
fully formatted log message.approximate_fallback
arg in calcQuadraticArcLength
. Added calcCubicArcLength
(#1142).*.afm
test assets to MAINFEST.in (#1137).SVG
tables containing color palettes (#1124).script
and script_extension
functions
returning inconsistent short vs long names. They both return the short four-
letter script codes now. Added script_name
and script_code
functions
to look up the long human-readable script name from the script code, and
viceversa (#1109, #1111).fontTools.unicodedata
which exports the
same interface as the built-in unicodedata
module, with the addition of
a few functions that are missing from the latter, such as script
,
script_extension
and block
. Added a MetaTools/buildUCD.py
script
to download and parse data files from the Unicode Character Database and
generate python modules containing lists of ranges and property values.__str__
method to all ast
elements (delegates to the
asFea
method).Parser
constructor now accepts a glyphNames
iterable
instead of glyphMap
dict. The latter still works but with a pending
deprecation warning (#1104).pens.perimeterPen
module (#1101).redirect_stdout
and redirect_stderr
context managers (#1097).CFF2Subr
class was added to accommodate this (#1091).morx
ligature subtables (#1082).unicode_literals
and struct
module in
old versions of python 2.7 (#993).SVGPathPen
that translates segment pen commands
into SVG path descriptions. Copied from Tal Leming's ufo2svg.svgPathPen
https://github.com/typesupply/ufo2svg/blob/d69f992/Lib/ufo2svg/svgPathPen.pyReverseContourPen
, a filter pen that draws
contours with the winding direction reversed, while keeping the starting
point (#1071).ContourFilterPen
to manipulate contours as a whole
rather than segment by segment.Vector
class to apply math operations on an array
of numbers, and pairwise
function to loop over pairs of items in an
iterable.cvar
table
(f874cf6, a25a401).SOURCE_DATE_EPOCH
environment variable when setting
the head
modified timestamp to ensure reproducible builds (#1063).
See https://reproducible-builds.org/specs/source-date-epoch/TSI*
tables text as UTF-8 (#1060).fontTools.svgLib
package. Includes a parser for SVG Paths that
supports the Pen protocol (#1051). Also, added a snippet to convert SVG
outlines to UFO GLIF (#1053).ankr
, bsln
, mort
, morx
, gcid
,
and cidg
.prop
, opbd
, bsln
, lcar
.__add__
and __radd__
methods on
otConverters._LazyList
that decompile a lazy list before adding
it to another list or _LazyList
instance. Fixes an AttributeError
in the subset
module when attempting to sum _LazyList
objects
(6ef48bd2, 1aef1683).lcar
table can be decompiled
and recompiled; futher work needed to handle morx
table (#1025).models.supportScalars
, ignore an axis when its peak value
is 0 (fixes #1020).CFF
and
head
tables, and min/max values in hhea
and vhea
tables (#970).AxisValueFormat4
for STAT table v1.2 from OT v1.8.2
(#1015)._DehintingT2Decompiler.op_hintmask
(c0d672ba).isCFF2
state; use one set of classes for
both CFF and CFF2, maintaining backward compatibility existing code (#1007).-x
option, pad with space if table tag length is < 4.__bool__()
semantics to match those
of other iterables (e46f949). Removed __abs__()
(3db5be2).mapped
keyword argument to
interpolate_layout
to allow disabling avar mapping: if False (default),
the location is mapped using the map element of the axes in designspace file;
if True, it is assumed that location is in designspace's internal space and
no mapping is performed (#950, #975).specializer
module to optimize CFF
charstrings, used by the T2CharStringPen (#948).array.array
typecode (#963, #964).avar
table, using the designspace
<map>
elements.build(..., axisMap)
argument. Axis map should
be specified in designspace file now. We do not accept nonstandard axes
if <axes>
element is not present.standard_axis_map
. This was
added before when glyphsLib was always exporting the (unused) custom axis.MVAR
table; does not
implement gasp
table variations yet.addComponent
method from BasePen into a separate abstract
DecomposingPen class; added DecomposingRecordingPen, which records
components decomposed as regular contours.LogMixin
class providing a log
property to
subclasses, which returns a logging.Logger
named after the latter.assertRegex
method to CapturingLogHandler
.types.SimpleNamespace
class.zip
iterator.GraphicsPath
class:
https://wxpython.org/docs/api/wx.GraphicsPath-class.htmlheight
and tsb
(top
side bearing) attributes from the vmtx
table, if present.GlyphCoordintes
class, added __bool__
/ __nonzero__
methods, and array
property to get raw array.# ...
appearing in between statements (#879).CFF2
table (thanks to
@readroberts at Adobe), and TTFA
(ttfautohint) table.NumShorts
, i.e. the number of deltas in ItemVariationData's delta sets
that use a 16-bit representation (b2825ff).fontTools.misc.symfont
module, for symbolic font
statistical analysis; requires sympy
(http://www.sympy.org/en/index.html)fontTools.varLib.interpolatable
module for
finding wrong contour order between different mastershead
modified timestamp when
saving CFF fontsgasp
table merge logic so that only the one from
the first font is retained, similar to other hinting tables (#862)varLib
package, as well as test fonts
from the "Annotated OpenType Specification" (AOTS) to exercise ttLib
's
table readers/writers (<https://github.com/adobe-type-tools/aots>)--no-hinting
option whereby advance widths in
Type 2 charstrings were also being stripped (#709, #343)name
now handles Unicode codepoints beyond the Basic
Multilingual Plane, also supports old-style MacOS platform encodings (#842)instruction
element is
written as a simple tag if empty (#819).*_test.py
) have been moved outside of the
fontTools package to the Tests folder, thus they are no longer
installed (#811).HVAR
table for fonts with
TrueType outlines; removed --build-HVAR
command-line option.feaLib.builder_test.test_extensions
and
baseClass.feax (#794, fixes #773).feaLib
command to the 'fonttools' command-line
tool; applies a feature file to a font. fonttools feaLib -h
for
help.T2CharStringPen
now takes an optional
roundTolerance
argument to control the rounding of coordinates
(#804, fixes #769).FONTTOOLS_MANPATH
environment variable (#799, fixes #84).agl.toUnicode
function to convert AGL-compliant glyph names
to Unicode strings (#774)release
command of setup.py script.round3
function, allow the second argument to be
None
(#757)sstruct
and xmlWriter
modules, deprecated
since vesion 3.2.0, have been removed. They can be imported from the
fontTools.misc
package.--text
/--text-file
options containing non-BMP chararcters
(16d0e5e)fsSelection
bits matching head.macStyle
bits--build-HVAR
option to generate HVAR
table for
fonts with TrueType outlines. For CFF2
, it is enabled by default.varLib.interpolate_layout
and varLib.merger
modules)extra_path
Distutils
argument. This means that we no longer create a "FontTools" subfolder
in site-packages containing the actual fontTools package, as well as
the standalone xmlWriter and sstruct modules. The latter modules are
also deprecated, and scheduled for removal in upcoming releases.
Please change your import statements to point to from fontTools.misc
import xmlWriter and from fontTools.misc import sstruct.fontTools.*
sub-modules: e.g. fonttools ttx
,
fonttools subset
, etc.TTFont.saveXML
for overriding os-specific line endings (passed on
to XMLWriter
instances).setuptools_scm
to
dynamically load version info from a git checkout at import time.ttLibVersion
attribute in TTX files still showing '3.0'
instead of '3.1'.setuptools_scm
to manage package versions.--with-zopfli
option to use Zopfli to compress WOFF 1.0 fonts.symfont.py
, for symbolic font statistics analysis;
interpolatable.py, a preliminary script for detecting interpolation
errors; {merge,dump}_woff_metadata.py
.-f
option to overwrite output file(s)avar
, gvar
, fvar
, meta
feat
and gzip-compressed SVG tablesSVG
table (thanks to Read Roberts at Adobe)Never released
Never released
Fixed bugs: - 'hhea' table is now recalculated correctly - fixed wrong assumption about sfnt resource names