Re: [ft] Bad emulation of boldness.
Werner LEMBERG wrote: A stable version (otherwise I would have talked about the CVS). Looking into the CHANGES file you can find the following for 2.1.10: - A new API in FT_BITMAP_H (`FT_Bitmap_New', `FT_Bitmap_Convert', `FT_Bitmap_Copy', `FT_Bitmap_Embolden', `FT_Bitmap_Done') has been added. Its use is to convert an FT_Bitmap structure in 1bpp, 2bpp, 4bpp, or 8bpp format into another 8bpp FT_Bitmap, probably using a different pitch, and to further manipulate it. - A new API `FT_Outline_Embolden' (in FT_OUTLINE_H) gives finer control how outlines are embolded. - `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H) now handles bitmaps also (code contributed by Chia I Wu). Note that this function is still experimental and may be replaced with a better API. Does this answer the question? Yes, thanks. ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Bad emulation of boldness.
> > No. Embolding with fixed values is always problematic. Recent > > FreeType version have a function which enables the user to > > fine-tune the boldness. > > Do you mean a CVS version or the stable version (2.2.1, which I also > use)? A stable version (otherwise I would have talked about the CVS). Looking into the CHANGES file you can find the following for 2.1.10: - A new API in FT_BITMAP_H (`FT_Bitmap_New', `FT_Bitmap_Convert', `FT_Bitmap_Copy', `FT_Bitmap_Embolden', `FT_Bitmap_Done') has been added. Its use is to convert an FT_Bitmap structure in 1bpp, 2bpp, 4bpp, or 8bpp format into another 8bpp FT_Bitmap, probably using a different pitch, and to further manipulate it. - A new API `FT_Outline_Embolden' (in FT_OUTLINE_H) gives finer control how outlines are embolded. - `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H) now handles bitmaps also (code contributed by Chia I Wu). Note that this function is still experimental and may be replaced with a better API. Does this answer the question? Werner ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Bad emulation of boldness.
David Turner wrote: Hello Daniel, the problem is in the client libraries using FreeType to render the text. 2.2.1 provides both outline and bitmap emboldening functions, and the latter is capable of generating output exactly equal to your "good" screenshot. more precisely, the problem is that these libraries only use the vector emboldening algorithm, which only gives satisfying results with anti-aliase text. I would provide a patch if I had time, I recommend you to file bugs against libXft, Cairo, and probably OpenOffice.org if this is a big concern to you. Thanks, I submitted bug reports to Cairo and libXft (IDs: 8604 & 8605). I am not sure what to submit to OpenOffice.org, since I don't use that font with OOo, so I left it out. Daniel. ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Bad emulation of boldness.
Hello Daniel, the problem is in the client libraries using FreeType to render the text. 2.2.1 provides both outline and bitmap emboldening functions, and the latter is capable of generating output exactly equal to your "good" screenshot. more precisely, the problem is that these libraries only use the vector emboldening algorithm, which only gives satisfying results with anti-aliase text. I would provide a patch if I had time, I recommend you to file bugs against libXft, Cairo, and probably OpenOffice.org if this is a big concern to you. Regards, - David Turner - The FreeType Project (www.freetype.org) On Tue, 10 Oct 2006 14:10:08 +0200, "Daniel M." <[EMAIL PROTECTED]> said: > > Hello everybody. > > Generally, X renders .ttf fonts exactly as Windows does, but there is > the following problem: usually .ttf file for a particular font contains > a number of styles: Regular, Bold, Italic and Bold Italic, so that when > application uses bold font, it uses Bold style instead of Regular. But > when .ttf doesn't contain Bold style, for example, and bold font is > required, boldness is emulated. Now, Windows emulates boldness perfectly, > but X does it really badly. For example, see the difference between > Windows > and X in bold font rendering in the following screnshots: > > Windows: http://xt.nm.ru/monaco-win-10pt_1.tif > Linux: http://xt.nm.ru/monaco-lin-10pt.tif > > The font used in a screenshot is Monaco (.ttf version), but there > is the same problem with other fonts which don't have Bold style > "built-in", for example Ariel Mono and others. > > I use libfreetype 2.2.1 (Ubuntu Edgy). > > Is it possible somehow to improve the situation? > > > Daniel. > > > ___ > Freetype mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/freetype ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Bad emulation of boldness.
Werner LEMBERG wrote: The problem might be that the glyph drawing backend calls a convenient function provided by freetype to embolden the glyphs, which lacks parameters to control how embolden is done. Is it considered a bug? No. Embolding with fixed values is always problematic. Recent FreeType version have a function which enables the user to fine-tune the boldness. Do you mean a CVS version or the stable version (2.2.1, which I also use)? If it is in a CVS version, when the feature is expected to make it into the stable version? Also, will there be (or, if it already exists, where could I find it) a documentation about how to fine-tune boldness? Daniel. ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Bad emulation of boldness.
> > I suggest to use FontForge to do what you want. This can be > > controlled with scripts also. > > FontForge seems to ignore the hints in the font. I assume that you've built FontForge with a version of FreeType which has the TTF bytecode interpreter enabled, haven't you? Otherwise it should be probably reported as a bug to the FontForge mailing list since especially for generating bitmaps, interpreting the original hints is essential. Werner ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Bad emulation of boldness.
On Wed, Oct 11, 2006 at 12:39:02AM +0200, Werner LEMBERG wrote: > > though it is possible that I missed something while reading a map > > page, going to take a better look at it later. In any case, the best > > option is to make an original .ttf look good. > I suggest to use FontForge to do what you want. This can be > controlled with scripts also. FontForge seems to ignore the hints in the font. I use gbdfed instead to generate the bitmaps. That is, use gbdfed to generate a bdf font (10pt at 96 dpi). Then use FontForge to open the original Monaco.ttf, import this bdf font, and generate a bitmap-embedded TrueType font. The result is: http://people.debian.org.tw/~olv/freetype/monaco-lin-13px_bitmap.png -- Regards, olv ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Bad emulation of boldness.
> > The problem might be that the glyph drawing backend calls a > > convenient function provided by freetype to embolden the glyphs, > > which lacks parameters to control how embolden is done. > > Is it considered a bug? No. Embolding with fixed values is always problematic. Recent FreeType version have a function which enables the user to fine-tune the boldness. > > Another solution is to convert the font to a bitmap one for the > > pixel size used. The convenient function uses different algorithm > > to embolden bitmap glyphs, which is similar to what Windows does. > > It seems that ttf2bdf doesn't want to generate a bold version of a > font even when "-w Bold" option is used, Uh, oh, ttf2bdf uses FreeType 1 which isn't supported since years. The -w option of ttf2bdf doesn't modify the font at all, it only adjusts the used X Windows font name within the BDF file. > though it is possible that I missed something while reading a map > page, going to take a better look at it later. In any case, the best > option is to make an original .ttf look good. I suggest to use FontForge to do what you want. This can be controlled with scripts also. Werner ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Bad emulation of boldness.
Chia-I Wu wrote: On Tue, Oct 10, 2006 at 02:10:08PM +0200, Daniel M. wrote: Is it possible somehow to improve the situation? The problem might be that the glyph drawing backend calls a convenient function provided by freetype to embolden the glyphs, which lacks parameters to control how embolden is done. Enabling antialias should help: Is it considered a bug? If so, I would like to report it and hopefully somebody may be willing to fix it - I like antialiased fonts even less than an ugly bold emulation. Another solution is to convert the font to a bitmap one for the pixel size used. The convenient function uses different algorithm to embolden bitmap glyphs, which is similar to what Windows does. It seems that ttf2bdf doesn't want to generate a bold version of a font even when "-w Bold" option is used, though it is possible that I missed something while reading a map page, going to take a better look at it later. In any case, the best option is to make an original .ttf look good. Daniel. ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Bad emulation of boldness.
On Tue, Oct 10, 2006 at 02:10:08PM +0200, Daniel M. wrote: > Is it possible somehow to improve the situation? The problem might be that the glyph drawing backend calls a convenient function provided by freetype to embolden the glyphs, which lacks parameters to control how embolden is done. Enabling antialias should help: http://people.debian.org.tw/~olv/freetype/monaco-lin-10pt.png Another solution is to convert the font to a bitmap one for the pixel size used. The convenient function uses different algorithm to embolden bitmap glyphs, which is similar to what Windows does. -- Regards, olv ___ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
