Mykola Bohdiuk

Results 12 comments of Mykola Bohdiuk

I'm sorry, I didn't have much free time, but refactoring is in progress. I am shrinking changes to only apply to LoadOnlyHeaders case. As for those changes that affect both...

Force-pushed the new implementation, based on 3.0 branch (rev 5c4a09a5c0574c1701151202ede2be1857610a36). Also I edited the 1st post to reflect changes Performance numbers: first number is a re-run (font files are cached...

Reasoning behind using a separate class `LoadOnlyHeaders` instead of extracting information directly from `TrueTypeFont`: * easier to debug - single place to put breakpoints * easier to refactor: * for...

Thank you, I will fix the issues today. Re `readExact()`/`readUpTo()`: I will remove them for simplicity, they remained from my initial PR. I initially saw that `RandomAccessRead.read()` was called in...

Yes, I have the same `Com`, will investigate. Thanks for noticing I compared caches only on macOS initially

Found it: `RandomAccessReadUnbufferedDataStream.read()` in my initial code was using `readExact()` and thus returned `length`. After reverting to `read()`, I forgot to return the correct read amount

Re exception: 2 calls should've been `setError(String)` to avoid slow `fillInStackTrace()` in the exception constructor. Third call removed because existing exceptions should be forwarded indeed. Re "font.getNaming()" - don't remember,...

While I'm at it, I think it's better to replace "calling getter just for side-effects" ```java font.getNaming(); // calls NamingTable.readTable(); font.getHeader(); // calls HeaderTable.readTable(); ((OpenTypeFont) font).getCFF(); // calls CFFTable.readTable(); ```...

Or did I over-do it with `CFFParser.parseFirstSubFontROS()`?

When `onlyHeaders==true`, it discards useless entries, making `nameRecords` smaller and thus `readString()` is called fewer times in the following loop, reducing both computing and file reading. So it's slightly more...