Well, I can only help with my code for drawing glyphs with FreeType: http://fresh.flatassembler.net/fossil/repo/fresh/info/c248fd488593dbc3a0282c8478d7422802c026b6?ln=256-601
It is in assembly, but I am confident, that some details are better visible in assembly source. The above code handles properly (except possible bugs, of course) all possible pixel modes and draws the glyph in a 32bit memory based image (bitmap). Hope to be helpful. -- http://fresh.flatassembler.net http://asm32.info John Found <[email protected]> On Sun, 7 Jun 2015 09:05:37 +0200 katz - <[email protected]> wrote: > Dear FreeType mailing list, > > I am a beginner at using FreeType and new to the concept of subpixel > hinting. I've read through most API references that seemed related, but I > am still not sure how should I use the library to attain RGB (or RGBA?) > bitmaps with glyphs hinted on the subpixel level. If there are any examples > on this I did not manage to find, please direct me to it. > > So here is what I tried doing so far: > I built the library with both the FT_CONFIG_OPTION_SUBPIXEL_RENDERING and > the TT_CONFIG_OPTION_SUBPIXEL_HINTING definitions. Here is my program, that > runs without errors: > http://pastebin.com/YNhgwwAN > > With this method, I end up with a glyph bitmap which is three times wider > than the intended size. If this is the right approach, then my question is > how should I use this information to get an RGB bitmap with the right size? > The code tries to directly map the values of the result bitmap to the RGB > channels, but this doesn't seem right: > http://postimg.org/image/gbfdyh0b9/ > The colors are obviously too strong. > > I guess I am doing something really wrong here, because if I try different > sizes (for example: 31) the result will be distorted: > http://postimg.org/image/7s28scn9j/ > I am also getting distortions like that seemingly every time, if I don't > turn on LCD filtering. > > Any help on the subject is greatly appreciated! > > Regards, > - katz _______________________________________________ Freetype mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype
