1396 Commits

Author SHA1 Message Date
Olli Meier
1649973800 Make use of 'Best' in names 2022-02-09 17:44:28 +01:00
Olli Meier
1a16b24cd5 Fix unittests 2022-02-09 17:17:11 +01:00
Olli Meier
17f4b76714 remove wrong test file. 2022-02-09 17:07:32 +01:00
Olli Meier
c50f38ed0e extend name table with getFamilyName, getSubFamilyName and getNiceFullName + unittests 2022-02-09 17:06:02 +01:00
Cosimo Lupo
f3b4c5b031
Merge pull request #2521 from fonttools/fix-round-radial-gradient-circle
[colrv1] use math.isclose with relative tolerance to check radial circles' inside-ness
2022-02-01 10:57:55 +00:00
Cosimo Lupo
5558ccd3bb [colorLib.geometry] use math.isclose with relative tolerance to check circle inside-ness
Fixes rounding of radial gradient in 'SING OF THE HORNS' (medium-light skin tone) noto emoji 🤘🏼
2022-01-31 18:05:26 +00:00
Takaaki Fuji
5f2c492635 freetypePen: format code with Black 2022-01-31 20:56:03 +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
Nikolaus Waxweiler
96ac799cf9
Merge pull request #2506 from fonttools/ufolib-expand-reserved-filenames
[ufoLib] Expand reserved names and fix illegal characters
2022-01-24 10:41:37 +00:00
Cosimo Lupo
e68a5a173c colorLib_test: check that duplicate base glyphs share share the same PaintColrLayers
this test currently fails; currently the second, third, etc. base glyphs with the same layers gets a unique PaintColrLayers with NumLayers:1 that in turn contains the shared PaintColrLayers. They should instead all share the same PaintColrLayers. Fix in the next commit
2022-01-21 19:08:22 +00:00
Cosimo Lupo
036003e850
Merge pull request #2509 from fonttools/remove-win-wait-for-keypress-on-exit
remove waitForKeyPress on windows
2022-01-19 17:34:40 +00:00
Cosimo Lupo
c50cc3e1eb
Merge pull request #2508 from fonttools/jamo-as-hang-ot-script
unicodedata: alias 'jamo' script tag to 'hang'
2022-01-19 17:34:23 +00:00
Cosimo Lupo
7c38f3d393 remove waitForKeyPress on windows
One should just use 'pause' command in a batch script wait to for key press, no need for ttx to do anything.

Fixes #2507
2022-01-19 16:40:03 +00:00
Nikolaus Waxweiler
128326cd50 Expand reserved names and fix illegal characters 2022-01-18 10:13:22 +00:00
Cosimo Lupo
7b4c6af66c
Merge pull request #2494 from takaakifuji/ftpen
Add FreeType-based Pen for rasterisation
2022-01-12 13:07:28 +00:00
Cosimo Lupo
98f5fd3d5a unicodedata: alias 'jamo' script tag to 'hang'
see https://github.com/googlefonts/ufo2ft/issues/575#issuecomment-1009962836
2022-01-11 17:13:20 +00:00
Takaaki Fuji
f87f75a437 Replace base64-encoded images with PGM files
Surprisingly I found Preview.app can still display PGM images. While
somewhat legacy, it's a super straightforward format to (de)serialize.
The images are scaled to 50x50 px and only consume 5KB in total. Makes
more sense to human being than the previous base64-encoded zlib
compressed data, plus we don't have to add pillow as a dependency.
2022-01-12 01:09:15 +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
6f7ef4a838 Prefer single transform matrix over offset/scale 2022-01-11 23:02:37 +09:00
Cosimo Lupo
09e2d1d548 unicodedata: update the script direction list to Unicode 14.0
same as https://github.com/harfbuzz/harfbuzz/blob/3.2.0/src/hb-common.cc#L514-L613
2022-01-11 13:19:01 +00:00
Takaaki Fuji
42bc1257b4 Add reference for PSNR 2022-01-11 02:26:05 +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
2c0ab2a05a Relax assertions for rendering tests
There are possibilities that the rendering results may change among
FreeType versions. I've already used the PSNR comparison for cubic
vs quadratic testing, so I applied the same technique and threshold to
all rendering tests to relax assertions. Also handles the case that
MSE becomes zero. Optional dependencies are not needed for the tests.
2022-01-11 01:42:05 +09:00
Takaaki Fuji
0e880260ae Remove unnecessary import in test 2022-01-11 01:41:43 +09:00
Takaaki Fuji
d0dbbbd3c8 Rename to freetypePen/FreeTypePen 2022-01-10 23:51:28 +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
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
46c580f00b Fix import in unit test 2022-01-06 18:18:42 +09:00
Takaaki Fuji
e2fad4db11 Add FreeType-based Pen for rasterisation 2022-01-06 09:00:53 +09:00
Behdad Esfahbod
672b4032ad [merger] Fix duplicate-glyph-resolution GSUB-lookup generation code
Part of fixing https://github.com/fonttools/fonttools/issues/2475

Old code was mistakenly only adding the synthetic-generated feature
to the first language-system. In the case of merging Noto Grantha
and Noto Tamil fonts, Noto Tamil had two script systems: 'taml' and
'tml2', and we were adding the synthetic 'locl' feature only to the
DefaultLangSys of the 'taml' script, not the 'tml2' script. That was
the main bug.

A second issue was that the lookup was being added twice to the same
(synthetic) feature. Check before adding lookup, to avoid that.
2021-12-16 08:03:38 -07:00
Cosimo Lupo
d4b7ff66c9 merge_test: fix expected .ttx file with correct MarkFilteringSet values 2021-12-15 09:21:16 -07:00
Cosimo Lupo
de3830ba2b clarify comment a bit as per review 2021-12-03 11:16:59 +00:00
Cosimo Lupo
d89f90f46c subset_test: test COLR subset excludes glyphs resulting from glyf closure 2021-12-02 18:18:09 +00:00
Cosimo Lupo
32874cb372 subset/COLR: add reproducer for issue #2461
this currently fails with struct.error. Fix will ensue shortly
2021-12-02 18:01:24 +00:00
Khaled Hosny
0a7164a452
Merge pull request #2447 from fonttools/merge-cff-rebased
Merge CFF rebased
2021-11-19 14:20:26 +02:00
Khaled Hosny
1fa579f6b8 [merge] Add CFF merging integration test 2021-11-18 22:14:41 +02:00
Khaled Hosny
c20a63a166 [merge] Move test to its own dir 2021-11-18 21:27:01 +02:00
Khaled Hosny
18236ca91d
Merge pull request #2440 from dscorbett/dedupe-buildCoverage
[otlLib] Remove duplicates when building coverage
2021-11-18 15:36:37 +02:00
Simon Cozens
af9dfc94e7
Forbid empty classes (take 2) (#2446) 2021-11-18 11:31:49 +00:00
Cosimo Lupo
247fa84b98 only rename glyph element ids when clash actually occurs 2021-11-16 14:28:14 +00:00
Cosimo Lupo
dbcb9d6cee parametrize test_subset_single_glyph_per_svg, as per review 2021-11-16 14:06:24 +00:00
Cosimo Lupo
07455790b1 simplify ranges() generator 2021-11-16 14:06:24 +00:00
Cosimo Lupo
863c9de57c subset/svg_test: test more complex document with cross-references 2021-11-15 17:08:55 +00:00
Cosimo Lupo
a79106d09a add simple subset/svg_test.py 2021-11-15 17:08:55 +00:00
Cosimo Lupo
8d6a7617a2 minor: fix 4-space indentation from PR 2441 2021-11-08 12:27:26 +00:00
Rod S
7dd3488732 Traverse when there is no layer list 2021-11-06 14:26:27 -07:00
David Corbett
cfa69f245f [otlLib] Remove duplicates when building coverage 2021-11-06 13:32:43 -04:00
Rod S
6144202cd9 Don't crash if there is no layer list 2021-11-02 15:59:30 -07:00
Yao Wei (魏銘廷)
390640a357
update to unicode 14.0 2021-10-31 23:24:18 +08:00
Simon Cozens
563730f8ce
Support variable feature syntax (#2432) 2021-10-28 11:58:54 +01:00