-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creation of Table abstracts for read/writing. #5
Comments
on some of them can use @:from but this read has three parameters. |
Sorry did not get to this earlier, I have started this branch in relation to splitting read into Tables so that abstracts support Write and toString ( for Tools ), for the and game of creating ttf write. https://github.com/nanjizal/HxTrueType/blob/save/src/format/ttf/tables/TODO.md If you have any thoughts on approach then welcome feedback, it's going to take a lot of effort but I think it will be worth it, if you have time and keen we can split the work. Aim get the tables roughly right then try to reintegrate one by one perhaps partially merging with current Reader prior to swapping reader. Once it works same as currently again, then look at details of wiring up Write and considering if the table writes need adjustment for actual writting. The new code is in the 'save' branch and far from useful. |
The Reads for lots of the tables have been abstracted and now seem to run with current code, see italic entries. |
Cambiata
I propose a cleaner approach to font table construction by creating a folder table and create an abstract for reading and writing each table.
For instance start to move function in the reader such as readHmtxTable as an abstract that is setup to make reading and writing simpler. I am not overly sure on the write but imagine it might look a bit like the code below.
The concept initially would be to work towards being able to modify fonts ( so store construction tables to write back to ) then later perhaps creating tables from scratch. At which stage we may need some more thought into structures so they are rational to create from scratch but initially can assume a simpler state were we read write.
Obviously at this stage I am unsure of the exact detail on the write to output with offsets but I think if we assume just direct writing we can tweak that when we have all the tables setup to write.
Please let me know if this approach seems sensible. If you have questions I can try to explain better, perhaps even implement. I know it is quite nice to have everything structured in reader and data for 'format' compatibility but I think table subfolder might work but open to your thoughts on this but I think the abstract approach within that structure is clean.
The text was updated successfully, but these errors were encountered: