[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] FTC_SBitCache_Lookup and manual bold/italic
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] FTC_SBitCache_Lookup and manual bold/italic |
Date: |
Mon, 26 Aug 2013 22:11:20 +0200 (CEST) |
Sorry, I was on vacation (more or less), and my backlog of e-mails is
huuuge. Additionally, I'm not an expert regarding FreeType's cache
code.
>> The challenge is that the existing VLC code supports manually
>> applying bold/italic for those fonts which don't natively support
>> it. With the original code, this was done with
>> FT_GlyphSlot_Embolden(). With my new code that used the
>> imagecache, I was able to get the same functionality to work with
>> FT_Bitmap_Embolden().
>>
>> Now that I'm moving to using the SbitCache functionality, what's
>> the process for achieving the same effect? As far as I can tell,
>> because I'm getting the actual rendered bitmap instead of the glyph
>> I cannot simply use the FT_Bitmap_Embolden() function.
Why not? `FT_Bitmap_Embolden' takes a bitmap as an argument, and
`FTC_SBitCache_Lookup' returns one. Transforming an `FTC_SBitRec'
structure to `FT_Bitmap' doesn't look problematic.
What difficulties have you encountered?
>> I've got everything working except for this edge case (and the code
>> now performs *significantly* better), but I need to handle this
>> case in order for the improvements to be accepted upstream.
Ideally, as mentioned in source code file `ftcglyph.h', one would
extend `FTC_GNode' and `FTC_Family' with new sub-classes to handle
emboldening, but this is probably an old, slightly out-of-date
comment, and I'm not sure whether all the needed stuff is available in
public header files.
Werner