Cosimo Lupo
83ee6bcdab
ttCollection: don't close file inside init if lazy=True
...
Fixes 'seek of closed file' error #2549
2022-03-17 12:30:40 +00:00
Cosimo Lupo
e1b3bfc807
ttCollection_test: check loading TTCollection with lazy attribute
...
currently lazy=True fails with 'ValueError: seek of closed file'
2022-03-17 11:43:11 +00:00
Cosimo Lupo
e726217ae0
ttFont_test: add test for setGlyphOrder updating glyf.glyphOrder
2022-03-10 17:43:02 +00:00
Cosimo Lupo
c2ad857050
Merge pull request #2528 from moontypespace/improve_buildStatTable
...
Add windowsNames and macNames parameters to buildStatTable
2022-02-11 18:23:54 +00:00
Olli Meier
61ad06fc3a
rename unittest with better name + get rid of redundant code
2022-02-11 17:51:52 +01:00
Olli Meier
86e4795405
As requested: black Tests/otlLib/builder_test.py
2022-02-11 15:58:34 +01:00
Olli Meier
3b1fac049d
Renamed unittest as requested by anthrotype
2022-02-11 15:56:03 +01:00
Olli Meier
1d51bc2b8e
Changes as requested by Just.
2022-02-11 15:55:25 +01:00
Olli Meier
68fa3bbd47
Cleaning code based on feedback from Just
2022-02-10 22:13:58 +01:00
Olli Meier
384415f573
Update Tests/ttLib/tables/_n_a_m_e_test.py
...
Co-authored-by: Just van Rossum <justvanrossum@gmail.com>
2022-02-10 21:59:39 +01:00
Olli Meier
4a0b559caf
Update Tests/ttLib/tables/_n_a_m_e_test.py
...
Co-authored-by: Just van Rossum <justvanrossum@gmail.com>
2022-02-10 21:59:29 +01:00
Olli Meier
e968e8fd7f
Based on the discussion with Just and anthrotype: Undo the changes in the name table and extend unittests. If there are inconsistencies in the name table, it's ok to create new name IDs, even if this might not be the most efficient way of creating the name table.
2022-02-10 21:24:51 +01:00
Olli Meier
ad1d82f810
Some more changes. Not sure about this.
2022-02-10 17:56:42 +01:00
Olli Meier
51eda21b0a
Adding more unittests, based on feedback.
2022-02-10 17:11:26 +01:00
Olli Meier
6bf842a30e
Reduce unittest content and update description.
2022-02-10 16:31:17 +01:00
Olli Meier
9028a53d3b
based on feedback 'anthrotype' I use 'windowsNames' and 'macNames' in STAT table functions and 'windows' and 'mac' in name table functions.
2022-02-10 15:57:56 +01:00
derwind
b437417b71
Added the ability to recreate the PS stream ( #2504 )
...
* added the ability to recreate the PS stream
This fixes #2503
2022-02-10 15:53:12 +01:00
Olli Meier
6014cd8ae5
based on Just Van Rossum's feedback: replace variables.
2022-02-10 15:39:51 +01:00
Olli Meier
7f21d5eee3
adding variable platforms
2022-02-10 15:14:20 +01:00
Olli Meier
0f17da0836
Bugfix: The script to create a STAt table created multiple unnecessary name table entries, because it did not take care a bout existing entries with the same name.
2022-02-10 13:44:42 +01:00
Olli Meier
62bc692da1
adding description
2022-02-10 13:09:27 +01:00
Olli Meier
01ba5394fb
Create failng unittest first.
2022-02-10 13:07:37 +01:00
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