Re: [Inquiry] Auto-fit on monochrome output
>> ahh it's on the very legacy display, which is monochrome at 72dpi >> we have no choice but to find out what can be done to improve the >> appearance > > Hand-tuned bitmap fonts. Yeah, and you should additionally use well-hinted Windows fonts that contain support for monochrome rendering. In most cases you are on the safe side if you choose fonts that already existed in the XP era. Of course, if you need support for more 'exotic' languages this route will probably be unsuccessful, alas. Check the 'gasp' table in the fonts, for example with `ttx -t -gasp`. https://learn.microsoft.com/en-us/typography/opentype/spec/gasp https://pypi.org/project/fonttools/ For example, Windows's `pala.ttf` font comes with monochrome hinting support in the range 9 to 17 ppem, even today, AFAICS. Werner
Re: [Inquiry] Auto-fit on monochrome output
On Wed, 8 Nov 2023 16:27:03 +0800, Jm Moon wrote: > ahh it's on the very legacy display, which is monochrome at 72dpi > we have no choice but to find out what can be done to improve the > appearance Hand-tuned bitmap fonts.
Re: [Inquiry] Auto-fit on monochrome output
ahh it's on the very legacy display, which is monochrome at 72dpi we have no choice but to find out what can be done to improve the appearance Thank You. Best Regards JM Moon On Wed, 8 Nov 2023 at 16:25, Werner LEMBERG wrote: > >> Define 'improve hinting'. It's not clear to me what you actually > >> want to achieve. > > > > Currently we are using FT_LOAD_RENDER | FT_LOAD_TARGET_MONO | > > FT_LOAD_MONOCHROME and still seeing very bad appearance. So not > > sure if I missed anything there in order for the monochrome > > character to look nicer? > > This is not what I mean. I want to know *why* you need this very > special type of rendering. What's the purpose? Today, it's quite > unusual that you want monochrome rendering (at small sizes, I guess). > > > Werner >
Re: [Inquiry] Auto-fit on monochrome output
>> Define 'improve hinting'. It's not clear to me what you actually >> want to achieve. > > Currently we are using FT_LOAD_RENDER | FT_LOAD_TARGET_MONO | > FT_LOAD_MONOCHROME and still seeing very bad appearance. So not > sure if I missed anything there in order for the monochrome > character to look nicer? This is not what I mean. I want to know *why* you need this very special type of rendering. What's the purpose? Today, it's quite unusual that you want monochrome rendering (at small sizes, I guess). Werner
Re: [Inquiry] Auto-fit on monochrome output
> Define 'improve hinting'. It's not clear to me what you actually want to achieve. Currently we are using FT_LOAD_RENDER | FT_LOAD_TARGET_MONO | FT_LOAD_MONOCHROME and still seeing very bad appearance So not sure if I missed anything there in order for the monochrome character to look nicer? Thank You. Best Regards JM Moon On Wed, 8 Nov 2023 at 13:35, Werner LEMBERG wrote: > >> No, (good) auto-hinting is not available for monochrome display. > > > > Does this mean even if I load the glyph with FT_LOAD_FORCE_AUTOHINT, > > the autofit algorithm also will not perform any hinting? > > It will perform hinting but expect very ugly results. > > > I'm using the TrueType font, any way to improve the hinting other > > than FT_LOAD_TARGET_MONO? > > Define 'improve hinting'. It's not clear to me what you actually want > to achieve. > > >> A segmentation fault shouldn't happen; I guess you are forgetting > >> to check a return value somewhere. If the problem persists please > >> provide a small stand-alone code snippet for testing purposes that > >> I can compile and run on the command line. > > > > bad case : Segmentation fault "potentially unexpected fatal signal 11" > > -->tried with combination of > > FT_LOAD_RENDER | FT_LOAD_FORCE_AUTOHINT > > FT_LOAD_RENDER | FT_LOAD_TARGET_MONO | FT_LOAD_FORCE_AUTOHINT > > FT_LOAD_RENDER | FT_LOAD_MONOCHROME | FT_LOAD_FORCE_AUTOHINT > > Thanks, but these images don't help in any way to identify a possible > bug in FreeType. As I said, I need a small, compilable, stand-alone > snippet (written in C) that runs on the command line and exhibits the > problem. This means some work on your side to reduce your code as > much as possible – you are done if removing anything from the example > no longer triggers the problem. > > >Werner >
Re: [Inquiry] Auto-fit on monochrome output
>> No, (good) auto-hinting is not available for monochrome display. > > Does this mean even if I load the glyph with FT_LOAD_FORCE_AUTOHINT, > the autofit algorithm also will not perform any hinting? It will perform hinting but expect very ugly results. > I'm using the TrueType font, any way to improve the hinting other > than FT_LOAD_TARGET_MONO? Define 'improve hinting'. It's not clear to me what you actually want to achieve. >> A segmentation fault shouldn't happen; I guess you are forgetting >> to check a return value somewhere. If the problem persists please >> provide a small stand-alone code snippet for testing purposes that >> I can compile and run on the command line. > > bad case : Segmentation fault "potentially unexpected fatal signal 11" > -->tried with combination of > FT_LOAD_RENDER | FT_LOAD_FORCE_AUTOHINT > FT_LOAD_RENDER | FT_LOAD_TARGET_MONO | FT_LOAD_FORCE_AUTOHINT > FT_LOAD_RENDER | FT_LOAD_MONOCHROME | FT_LOAD_FORCE_AUTOHINT Thanks, but these images don't help in any way to identify a possible bug in FreeType. As I said, I need a small, compilable, stand-alone snippet (written in C) that runs on the command line and exhibits the problem. This means some work on your side to reduce your code as much as possible – you are done if removing anything from the example no longer triggers the problem. Werner
Re: [Inquiry] Auto-fit on monochrome output
> No, (good) auto-hinting is not available for monochrome display. Does this mean even if I load the glyph with FT_LOAD_FORCE_AUTOHINT, the autofit algorithm also will not perform any hinting? I'm using the TrueType font, any way to improve the hinting other than FT_LOAD_TARGET_MONO? > A segmentation fault shouldn't happen; I guess you are forgetting to check a return value somewhere. If the problem persists please provide a small stand-alone code snippet for testing purposes that I can compile and run on the command line. bad case : Segmentation fault "potentially unexpected fatal signal 11" -->tried with combination of FT_LOAD_RENDER | FT_LOAD_FORCE_AUTOHINT FT_LOAD_RENDER | FT_LOAD_TARGET_MONO | FT_LOAD_FORCE_AUTOHINT FT_LOAD_RENDER | FT_LOAD_MONOCHROME | FT_LOAD_FORCE_AUTOHINT [image: image.png] Good case [image: image.png] Thank You. Best Regards JM Moon On Wed, 8 Nov 2023 at 00:20, Werner LEMBERG wrote: > > > I am exploring this FreeType font engine library, am wondering if the > > auto-fit(auto-hint) support for monochrome display as well? > > No, (good) auto-hinting is not available for monochrome display. > > > I get segmentation fault whenever I use this flag -> > > FT_LOAD_FORCE_AUTOHINT > > > > FT_LOAD_RENDER | FT_LOAD_MONOCHROME | FT_LOAD_FORCE_AUTOHINT > > A segmentation fault shouldn't happen; I guess you are forgetting to > check a return value somewhere. If the problem persists please > provide a small stand-alone code snippet for testing purposes that I > can compile and run on the command line. > > > Werner >
Re: [Inquiry] Auto-fit on monochrome output
> I am exploring this FreeType font engine library, am wondering if the > auto-fit(auto-hint) support for monochrome display as well? No, (good) auto-hinting is not available for monochrome display. > I get segmentation fault whenever I use this flag -> > FT_LOAD_FORCE_AUTOHINT > > FT_LOAD_RENDER | FT_LOAD_MONOCHROME | FT_LOAD_FORCE_AUTOHINT A segmentation fault shouldn't happen; I guess you are forgetting to check a return value somewhere. If the problem persists please provide a small stand-alone code snippet for testing purposes that I can compile and run on the command line. Werner