pravins / lohit2

Rewriting lohit open type tables
Other
10 stars 10 forks source link

lohitize script? #9

Open davelab6 opened 10 years ago

davelab6 commented 10 years ago

In http://pravin-s.blogspot.in/2013/11/how-to-lohit-ise-open-type-fonts-not.html @pravins writes that to 'lohitize' a font you can follow 6 steps:

  1. git clone https://github.com/pravins/lohit2
  2. cd lohit2/devanagari (or the appropriate orthography)
  3. cp "yourfont.ttf" .
  4. open yourfont.ttf in fontforge and save as a yourfont.sfd
  5. open yourfont.sfd and update glyphs names as per lohit fonts.
  6. python ../scripts/apply_featurefile.py yourfont.sfd Lohit-.fea - this only import gsub of lohit project, it will keep gpos tables intact.

Step 4 could be easily automated with a 3 line script.

Step 5 could also be automated, perhaps by using github.com/davelab6/pyfontaine when it is extended to check glyphnames as well as unicode points (this month I expect)

Step 6, what is the purpose of keeping gpos tables in tact? And what if they are missing? :)

I suggest making a lohitize.py scrip that does this automatically :)

pravins commented 10 years ago

Yeah, good idea to automate this one. I was thinking this specifically for existing fonts around not updated from long time. Existing fonts will have gpos for specific to there design, so it is not necessary but for new font it is.

Agree with your idea for automating this task.

davelab6 commented 10 years ago

Yes, I have a lot of such fonts already :)

The glyph names are normalized so the standard lohit gsub tables can be used.

To use standard gpos tables in the same way, we need the anchor names to be normalised?

(I mean, we shouldn't have custom GPOS/GSUB tables in lohitized fonts; they should depend on the upstream tables, which are maintained by @snehakore , and then as the upstream makes improvements, all the lohitized fonts will benefit)

pravins commented 10 years ago

GPOS tables cant be standard, since those are keeps on changing as per design of font. One can import GPSO from lohit2, but then he need to do manual work to update it as per his design.