Re: 2.10.3 BW renderer changes
Davide Rizzo <[email protected]> Fri, 13 Jan 2023 13:23:01 +0100
| Newsgroups | gmane.comp.fonts.freetype.user |
|---|---|
| Organization | Eidos |
| Message-ID | <[email protected]> |
Thank you very much. This solves my problem. Davide Rizzo Il 12/01/23 02:53, Alexei Podtelezhnikov ha scritto: > Hi Davide, > > Thank you. I don't know how much you know about hinting vs rendering. > You seem to be confused about FT_LOAD flags. > >> FT_Load_Char(face, 'e', FT_LOAD_DEFAULT | FT_LOAD_TARGET_LIGHT | FT_LOAD_MONOCHROME | FT_LOAD_NO_BITMAP); > FT_LOAD_DEFAULT is just 0 and is meaningless in the OR-chain. > FT_LOAD_NO_BITMAP mean no embedded bitmaps, which Arial does not have, > if I am not mistaken > FT_LOAD_MONOCHROME is a selector of rendering algorithm, but you > postpone it until later. It has no effect > FT_LOAD_TARGET_LIGHTis the only flag that does a lot here: it enables > autohinting but only vertically, bytecode is disabled. > > As a result you might indeed use wrong hinting (or without horizontal > hinting) for a mono rendering. Please try FT_LOAD_TARGET_MONO as our > documentation clearly suggests for monochrome rendering. See > https://freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_load_xxx. > >> FT_Render_Glyph(face->glyph, FT_RENDER_MODE_MONO); > You might argue that it used to work. I really do not know how. Again, > you should get an Ok output with just FT_LOAD_TARGET_MONO do not make > it more complicated than that. > > Alexei > > On Wed, Jan 11, 2023 at 3:29 AM Davide Rizzo <[email protected]> wrote: >> Hi, >> >> You're right. >> >> I wrote a very simple test program to evidence the difference in the output. >> >> I attach the program, the font we use (a standard arial.ttf) and the >> different outputs I obtain at size 58. >> >> With freetype up to 2.10.2 I obtain the desired nice bitmap, with >> freetype since 2.10.3 (including the last 2.12.1) I obtain a different >> bitmap. >> >> My question is if it's possible with some parameter to obtain the "old" >> bitmap with freetype 2.12.1. >> >> Thank you >> >> Davide Rizzo >> >> >> Il 10/01/23 00:03, Alexei Podtelezhnikov ha scritto: >>> Davide, >>> >>>> The new output is much worse, most of chars have single dots protruding >>> in the external outline. >>> >>> We won't be able to help you unless you help us to reproduce or see >>> the issue. At the very least you should name the font and the size, >>> and give a screenshot. Also, in our mind, only bugs in 2.12.1 are >>> worth fixing. You should try this most recent version in case it is >>> fixed already. There could be other software that disabled the hinting >>> too. Therefore, we prefer that you show the issue using freetype demos >>> like ftview or ftgrid. >>> >>> Does this make sense? Your report does not have any details. You can >>> use https://gitlab.freedesktop.org/freetype/freetype/-/issues once you >>> have mode details. >>> >>> Can you help us to help you? >>> >>> Alexei > >