19 Commits

Author SHA1 Message Date
Nathan Williis
f771c37149 Docs: fix code-example blocks in pens. 2024-09-03 17:52:02 +01:00
Nikolaus Waxweiler
bdbc470f9f Revert "[svgPen] Write two digits after decimal by default"
This reverts commit 42d6b6b4fedf51dd741d3134da74df04339335b4.
2024-05-30 10:31:53 -07:00
Behdad Esfahbod
38d190a3cc Black 2024-05-22 18:46:06 -06:00
Behdad Esfahbod
42d6b6b4fe [svgPen] Write two digits after decimal by default 2024-05-22 18:45:28 -06:00
Behdad Esfahbod
0572f78718 [svgPathPen] Add --glyphs 2024-01-30 13:45:25 -08:00
Behdad Esfahbod
4d640046b2 [svgPathPen] Accept float axis locations 2023-11-14 09:10:09 -07:00
Behdad Esfahbod
ad6c5eb89c black 2023-07-24 13:01:57 -06:00
Behdad Esfahbod
050370764a [statisticsPen,svgPathPen] Add -y for face-index 2023-07-24 12:48:57 -06:00
Nikolaus Waxweiler
d584daa8fd Blacken code 2022-12-13 11:26:36 +00: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
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
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
Nikolaus Waxweiler
a3acb1426b Remove py23 import 2021-01-29 22:23:27 +00:00
Nikolaus Waxweiler
01328213c7 Remove __future__ imports 2019-08-09 12:20:13 +01:00
Cosimo Lupo
76e49d6ff5 rename SVGPen to SVGPathPen
This is to make clear that the pen deals specifically with SVG "path" element, not all SVG.
2017-10-15 15:18:35 +02:00