notofonts / balinese

Noto Balinese
SIL Open Font License 1.1
4 stars 2 forks source link

The NotoSansDuployan-Regular.ttf font is incompatible for merging with any other Noto font #38

Closed Veerjee closed 8 months ago

Veerjee commented 8 months ago

Defect Report

Noto fonts can be obtained from https://notofonts.github.io/ If you find a problem with a released font, then please use this template to file a defect report. Before filing your report, please check if the issue has been fixed in the latest development build. You can get development builds by finding the font family on https://notofonts.github.io/ and following the link to "Development builds".

Title

Should be brief but contain essential information.

Font

NotoSansDuployan-Regular.ttf

Where the font came from, and when

From the Noto fonts repo https://notofonts.github.io/

Font Version

Latest posted on the repo

OS name and version

NA -- Windows 11

Application name and version

merger script

Issue

The merger script will not merge this font with anyother Noto font unless you remove/ignore the GPOS table.

simoncozens commented 8 months ago

Yes, this is true. And I'm afraid it's not something we can easily fix - the Duployan font is quite different to everything else. There is a plan to produce a more simple Duployan font, but until then you can merge with an earlier version.

Veerjee commented 8 months ago

How is it different? Looks like any other font. The GPOS table issue exists even with the older version of the font when merging. Also please don't close an issue without giving a chance to reply.

On Fri, Feb 2, 2024 at 11:04 AM Simon Cozens @.***> wrote:

Yes, this is true. And I'm afraid it's not something we can easily fix - the Duployan font is quite different to everything else. There is a plan to produce a more simple Duployan font, but until then you can merge with an earlier version.

— Reply to this email directly, view it on GitHub https://github.com/notofonts/balinese/issues/38#issuecomment-1924508687, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4VES5SOVFTSICBSKQJQNJDYRU2FLAVCNFSM6AAAAABCXEDMUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRUGUYDQNRYG4 . You are receiving this because you authored the thread.Message ID: @.***>

simoncozens commented 8 months ago

There's not enough information to act on your issue. Please tell me:

Any information would allow me to debug this.

Veerjee commented 8 months ago

Pyftmerge ./NotoSans-Regular.ttf ./NotoMusic-Regular.ttf ...

WARNING: Dropped cmap subtable from font '15': format 0, platformID 1, platEncID 0 Traceback (most recent call last): File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\tables\otBase.py", line 403, in getData items[i] = packUShort(item.pos - pos) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\tables\otBase.py", line 793, in packUShort return struct.pack(">H", value) ^^^^^^^^^^^^^^^^^^^^^^^^ struct.error: 'H' format requires 0 <= number <= 65535

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Scripts\pyftmerge.exe__main.py", line 7, in File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\misc\loggingTools.py", line 372, in wrapper return func(*args, **kwds) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\merge\init__.py", line 201, in main font.save(outfile) File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\ttFont.py", line 185, in save writer_reordersTables = self._save(tmp) ^^^^^^^^^^^^^^^ File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\ttFont.py", line 225, in _save self._writeTable(tag, writer, done, tableCache) File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\ttFont.py", line 658, in _writeTable tabledata = self.getTableData(tag) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\ttFont.py", line 680, in getTableData return self.tables[tag].compile(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\tables\otBase.py", line 139, in compile return self.tryPackingFontTools(writer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\tables\otBase.py", line 188, in tryPackingFontTools return writer.getAllData() ^^^^^^^^^^^^^^^^^^^ File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\tables\otBase.py", line 644, in getAllData tableData = table.getData() ^^^^^^^^^^^^^^^ File "C:\Users\guruwazeer\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\ttLib\tables\otBase.py", line 408, in getData raise OTLOffsetOverflowError(overflowErrorRecord) fontTools.ttLib.tables.otBase.OTLOffsetOverflowError: ('GSUB', 'LookupIndex:', 672, 'SubTableIndex:', None, 'ItemName:', None, 'ItemIndex:', None)

Veerjee commented 8 months ago

I can generate the merge font if I use the iolder version of NotoSansDuployan-Regular.ttf

simoncozens commented 8 months ago

Looks like pyftmerge doesn't know how to resolve overflows. Did you try installing the uharfbuzz Python module? This helps fontTools to pack the tables more efficiently.

Veerjee commented 8 months ago

How do I add uharfbuzz Python module?

simoncozens commented 8 months ago

pip install uharfbuzz.

(But this is no longer about a bug in a Noto font; potentially there's a bug in fontTools, but you may be able to work around it.)

Veerjee commented 8 months ago

I have installed the uharfbuzz Python module. However, the problem of merging the latest version of NotoSansDuployan-Regular.ttf persists.

Upon building the font with the same set of fonts as before, a merged.ttf is now generated within seconds instead of the previous versions which took 5+ minutes to generate. This is excellent work. Thank you, Simon!

Also file size is slightly smaller. File size saving are mostly coming from GPOS and some from GSUB tables.