[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] FT_Set_Transform more info
From: |
David Turner |
Subject: |
Re: [Devel] FT_Set_Transform more info |
Date: |
Wed, 16 May 2001 23:04:19 +0200 |
Hi Mike,
Mike Owens a écrit :
>
> My problem seems to be in the cache manager. When I open the font library I
> immediately cache the lower half of the character set. In one scenerio I was
> setting the transform before characters were cached, hence, all characters
> were rotated.
>
> In the other scenerio, characters are cached with transform set to 0 degress.
> Then I set the transform 90 degrees. FTC_SBit_Cache_Lookup seems to realize
> that lower case rotated characters are not in the cache but does realize the
> upper case characters aren't. It doesn't seem to look at the transform which
> may be the desired implementation.
>
> So now my question is, how do I design my program to be able to change the
> current rotation of the current font face? Do I have to create separate font
> faces for each rotation?
>
> I would appreciate some suggestions.
>
The cache sub-system simply isn't been designed to cache rotated glyphs,
mainly because it would have brought un-needed complexity to its design
(which isn't already so simple anyway).
It is possible to achieve what you want though, by cheating a bit. The
idea is simply to create, for each font face, one specific FTC_FaceID
per desired rotation/angle value (for example, 0 degrees and 90 degrees)
each FTC_FaceID will be resolved to a different FT_Face by your
face requester callback, where you'll appropriately call FT_Set_Transform
on the face object that is returned.
this should work transparently, with any kind of cache (though I suppose
you're using the small bitmaps cache). The only drawback is that you may
end up opening the same font file twice; however, this is not really a
problem since the cache sub-system already limits the number of opened
faces..
Hope this helps,
Regards,
- David