From: <pra...@gm...> - 2012-10-01 11:18:24
|
On 1 October 2012 15:02, pra...@gm... <pra...@gm...> wrote: > > > On 29 September 2012 16:08, Khaled Hosny <kha...@eg...> wrote: > >> On Sat, Sep 29, 2012 at 11:52:33AM +0530, pra...@gm... wrote: >> > Hi, >> > >> > I have downloaded >> https://googlefontdirectory.googlecode.com/hg/ofl/cousine/ >> > Cousine-Regular.ttf and saved as .sfd and regenerated ttf from it. But >> > regenerated font does not get recognized as a Monospace in Windows >> http:// >> > www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty.exe >> > While the original downloaded font get recognized there properly. >> > >> > What might be going wrong while saving it as .sfd and regenerating >> .ttf? >> > >> > Regenerated font http://pravins.fedorapeople.org/Test-Cousine.ttf >> >> The original font has the isFixedPitch bit in post table set which it >> seems used by some application to recognise monospace fonts (though >> this, arguably, is wrong, there is no requirement that all monnospace >> fonts set it). Per the spec, isFixedPitch is only set when all glyphs in >> the font have the same width, but the font has a zero width ".null" >> glyph, so FontForge does not set isFixedPitch when generating the font >> (which is the right thing to do, some applications is know to behave >> wrongly with such a font). >> >> Removing that glyph (which seems to serve no purpose and was probably >> auto inserted by the tool generating the font), should do the trick. >> > > Converting Cousine-Regular.ttf to .sfd and > > $cat Cousine.sfd |grep "Width: 0"|wc -l > 267 > > We have lots of Zero width characters in Cousine-Regular fonts and > removing them looks not good solution. > > Do we have any other alternative to Set isFixedPitch bit? > While more analysis i found that 0 width is assigned to most of the marks characters. 1. In my humble opinion it is valid. We can not assign equal Width same as Base characters to Marks character. Font with "Decided Fixed width" or "0 Width" characters should be considered as a Monospace. 2. Other reasons is compatibility with other font editors. Thanks, Pravin Satpute |