freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Advanced (?) character composition


From: Erik Möller
Subject: [ft] Advanced (?) character composition
Date: Wed, 17 Sep 2008 16:56:53 +0200

Hi,

 

I’m trying to use FT to render some nice glyphs to be used in a game I’m working on. Basically I’m trying to achieve what PhotoShop’s layer effect “stroke” (outside stroke) with a different color does.

I haven’t used FT before so after a quick foray into the docs I got a black outside stroked glyph rendered into one bitmap and a white regular glyph into another bitmap and was about to combine them when I realized they didn’t have the same dimensions. I tried the naïve implementation of blending the smaller bitmap into the larger by just centering it. That of course produced some neat results on some characters and not so neat on others where the difference in dimensions were not divisible by two.

 

I couldn’t find the answer to how to do this properly in the docs. The only two ideas I have currently is trying direct rendering hoping that the stroked glyph and regular one are in fact  centered around the same coordinates or resorting to some naïve centering with supersampling…but that sounds like a hack that will still produce incorrect results in some cases so I’d rather not have to resort to that.

 

I’m hoping I’m missing something simple from the doc, or that direct rendering is the solution.

Any feedback is appreciated.

 

/Erik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]