Behdad Esfahbod
df43ae3684
[basePen] Add addVarComposite() to DecomposingPen
...
Also change AbstractPen's.
2023-02-03 12:37:40 -07:00
Behdad Esfahbod
11b2427f61
[pointPen] Add addVarComponent to GuessSmoothPointPen
2023-02-03 11:19:04 -07:00
Behdad Esfahbod
284f97670b
[recordingPen] Record VarComponents in RecordingPointPen
2023-02-03 11:06:56 -07:00
Behdad Esfahbod
2e20e47473
[transform] Rename VarTransform to DecomposedTransform
2023-02-03 09:05:55 -07:00
Behdad Esfahbod
69966aa5d7
[BasePen] Add addVarComponent()
2023-02-02 15:25:09 -07:00
Cosimo Lupo
c30a6355ff
Merge pull request #2925 from fonttools/blacken-code
...
Blacken code
2022-12-14 18:53:35 +00:00
Behdad Esfahbod
78a939848f
[Cu2QuMultiPen] Add tests and fix a but
...
Fixes https://github.com/fonttools/fonttools/issues/2926
2022-12-13 11:28:33 -07:00
Nikolaus Waxweiler
d584daa8fd
Blacken code
2022-12-13 11:26:36 +00:00
Behdad Esfahbod
4f3cb7e4bc
[cu2quPen] Add Cu2QuMultiPen
2022-12-12 09:55:12 -07:00
Behdad Esfahbod
78e10d8b42
[ttGlyphPen] Add outputImpliedClosingLine argument
...
Fixes https://github.com/fonttools/fonttools/issues/2913
2022-12-12 09:53:59 -07:00
Behdad Esfahbod
ddbbef2257
[reverseContourPen] Add outputImpliedClosingLine
...
Fixes https://github.com/fonttools/fonttools/issues/2914
2022-12-12 09:49:06 -07:00
Behdad Esfahbod
73923b3a1e
Typo
2022-12-07 15:19:07 -07:00
Behdad Esfahbod
f379aced4d
[svgPathPen] Don't close path in endPath()
...
Fixes https://github.com/fonttools/fonttools/issues/2089
2022-10-26 14:36:22 -06:00
Behdad Esfahbod
78f12ab12d
[pens] Add cairoPen
2022-08-24 09:40:17 -06:00
Behdad Esfahbod
5674a0bfc8
[svgPathPen] Document coordinate system
...
Fixes https://github.com/fonttools/fonttools/issues/2388
2022-08-20 11:00:49 -06:00
Behdad Esfahbod
8ad260d33d
[svgPathPen] Make it show in fonttools --help
2022-08-18 07:43:28 -06:00
Behdad Esfahbod
33d51f52a7
[svgPathPen] Accept --variations
2022-08-14 12:08:12 -06:00
Behdad Esfahbod
6df779fd5d
[svgPen] Add main that prints SVG for input text
2022-08-13 15:23:10 -06:00
Behdad Esfahbod
52b28f9022
[statisticsPen] Avoid division-by-zero
2022-08-12 14:00:27 -06:00
Behdad Esfahbod
97df4a130c
[symfont/momentsPen] Cythonize greenPen / momentsPen
...
Makes varLib.interpolatable 3x faster.
2022-07-28 15:35:51 -06:00
Behdad Esfahbod
22fd6f3eeb
[momentsPen] Remove manual editions
...
Move OpenContourError to basePen.
2022-07-28 14:01:31 -06:00
Behdad Esfahbod
4139d8914a
[statisticsPen] By default report all glyphs
2022-07-12 16:39:56 -06:00
Takaaki Fuji
5f2c492635
freetypePen: format code with Black
2022-01-31 20:56:03 +09:00
Takaaki Fuji
48cbe7b054
freetypePen: prefer FT_CURVE_TAG enums
2022-01-31 20:55:33 +09:00
Takaaki Fuji
cd5c16f4d4
freetypePen: cosmetic changes
2022-01-31 18:08:51 +09:00
Takaaki Fuji
9eadd908c6
freetypePen: fix bits for cubic on-curve
2022-01-31 18:08:51 +09:00
Takaaki Fuji
e1c3cdcfde
freetypePen: raise PenError when missing moveTo
2022-01-31 18:08:51 +09:00
Takaaki Fuji
a27789c477
freetypePen: handle rotate/skew transform
...
The pen is designed to determine the bitmap size when omitted, which
helps users to see an image somehow even when they have no idea how the
arguments should be passed. And I realised that I didn't give enough
thought to rotate/skew transforms in former PRs. This commit fixes the
calculation of the bbox after transformation. Also tries to clear up how
the autosizing options work in the docstring.
Some minor fixes will follow.
2022-01-31 18:08:51 +09:00
Takaaki Fuji
a7e330aa83
Revert "Raise ImportError in __init__"
...
This reverts commit 24d356da25a148c63c78c461a8ccc7e632371ca4.
2022-01-13 18:59:47 +09:00
Takaaki Fuji
0e5b5790ef
Fix example code block formatting in docs
2022-01-13 15:09:45 +09:00
Takaaki Fuji
24d356da25
Raise ImportError in __init__
...
Importing freetype at import time breaks the Read the Docs build. Solves
the issue by raising an error in __init__ as fontTools.ttLib.woff2 does,
while avoiding adding an extra line to Doc/docs-requirements.txt.
2022-01-13 08:42:58 +09:00
Takaaki Fuji
d181ecaaaf
Fix warnings when generating docs
2022-01-12 01:27:40 +09:00
Takaaki Fuji
072b4c8db0
Fit to contents when image size omitted
...
Eliminates the assumption of any specific metrics from the pen. It still
gives some image without giving any parameters, thus it should be a good
starting point for new users.
2022-01-11 23:02:37 +09:00
Takaaki Fuji
e3bbf39a28
Move evenOdd to end in kwargs
...
Should put dimension-related arguments into a group.
2022-01-11 23:02:37 +09:00
Takaaki Fuji
6f7ef4a838
Prefer single transform matrix over offset/scale
2022-01-11 23:02:37 +09:00
Takaaki Fuji
184a6152f6
Opt out of running doctest
2022-01-11 02:00:38 +09:00
Takaaki Fuji
d399e93d95
Rename even_odd to evenOdd
...
PointInsidePen already uses camelCase convention for the argument.
2022-01-11 01:42:05 +09:00
Takaaki Fuji
d0dbbbd3c8
Rename to freetypePen/FreeTypePen
2022-01-10 23:51:28 +09:00
Takaaki Fuji
9a9d0f0895
Remove save() method
...
As Khaled suggests, 'pen.image().save()' will do.
2022-01-10 23:43:59 +09:00
Takaaki Fuji
e3694b602b
Fix another typo in docstring
2022-01-10 23:25:09 +09:00
Takaaki Fuji
bf45aec95f
Fix typo
2022-01-10 19:08:11 +09:00
Takaaki Fuji
dd72f7c326
Fix missing call to superclass __init__
2022-01-10 18:19:58 +09:00
Takaaki Fuji
e4c1deb64f
Add documentation
...
Note that the example covers a ltr/rtl/ttb typesetting with uharfbuzz.
2022-01-08 02:06:14 +09:00
Takaaki Fuji
f7c29e89be
Change arguments for positioning and dimension
...
After experimenting with uharfbuzz for a while, I found out it was hard
to handle top-to-bottom texts, so I gave up an idea to put an ascender
or a descender value in the arguments. Instead, I simply expose 'offset',
'width' and 'height', which is way more straightforward than the
previous design.
In addition, 'contain' option is added to easily compensate and render
glyphs such as combining accents or excessively tall letters.
2022-01-07 22:29:01 +09:00
Takaaki Fuji
288d907497
Stop trying to cache modules pointlessly
2022-01-06 22:10:05 +09:00
Takaaki Fuji
10a3ca8ea5
Use freetype-py instead
...
I didn't expect that the PyPI package contains the pre-built binary
for each platform. Skip the test when freetype-py is not avaiable.
2022-01-06 19:07:26 +09:00
Takaaki Fuji
55dca28734
Remove execute permission
2022-01-06 17:49:43 +09:00
Takaaki Fuji
e2fad4db11
Add FreeType-based Pen for rasterisation
2022-01-06 09:00:53 +09:00
Cosimo Lupo
9f38d4de12
svgPathPen: forgot to replace remaining str() with self._ntos()
...
H and V commands were not passed through the custom number-formatting callable.
2021-12-19 10:35:46 +00:00
Cosimo Lupo
fce1fa2da8
svgPathPen: add option to customize number formatting (e.g. rounding)
...
Using a RoundingPen as a filter doesn't work for TrueType quadratic splines (qCurveTo), because the rounding would occur too early, before these get split into atomic quadratic Bezier segments (by the superclass BasePen.qCurveTo method), thus leaving unwanted floating-point coordinates in the SVG output.
So here we add a 'ntos' parameter (by default simpli calls str()) that takes a Callable[[float], str] and can be used to customize the formatting of the numbers in SVG path coordinates.
2021-12-14 13:19:50 +00:00