From: Khaled H. <kha...@eg...> - 2012-10-01 13:14:17
|
On Mon, Oct 01, 2012 at 03:02:15PM +0530, 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 The font you linked to have only a single zero with glyph, .null. > 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? Check how DejaVu Sans Mono is doing it. Regards, Khaled |