[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Is it BUG???
From: |
mpsuzuki |
Subject: |
Re: [ft-devel] Is it BUG??? |
Date: |
Thu, 27 Aug 2009 01:00:09 +0900 |
Hi,
On Wed, 26 Aug 2009 15:57:21 +0300
Z3N <address@hidden> wrote:
>Hi! Can you tell me what wrong in this code? Or its one of bugs in
>freetype? I'm use FF 2.3.9.s
>/* There hide code, which initializing FF... correctly.
>Other things, like rendering, working....*/
>FT_UInt Left,Right;
>FT_Vector delta;
>Left=FT_Get_Char_Index( face, (FT_ULong)* L"V" );
>Right=FT_Get_Char_Index( face,(FT_ULong)* L"A" );
>FT_Get_Kerning( face, Left, Right,FT_KERNING_DEFAULT, &delta );
>delta.x=delta.x>>6;
>
>But, the value, which returned from FT_Get_Kerning always 0! This face
>support kerning, I check it with macros FT_HAS_KERNING and he is return
>40!!! This is good, isn't?
>What's wrong???
Oh, please give a name for any free font to reproduce your problem.
>And can you tell me how do I handle the "Italic" style in face? Imagine,
>I'm create face from file "arial.ttf" and later I need aply "Italic"
>style to them. I'm know what "italic" style located in other file
>"ariali.ttf", but maybe FreeType provide some useful API for this
>case??? This is can save my psychical health :). Or I need create new
>face from "ariali.ttf" and render from this face???
FT_Face object is bound to the font file or memory image
that you opened. In this case, when you open alial.ttf
and create an FT_Face object once, you cannot disconnect
it from arial.ttf. You should open ariali.ttf as another
FT_Face object.
In addition, the searching of font file - from arial.ttf
to ariali.ttf - is not the task of FT2. Most Unix applications
use fontconfig library to obtain the location of expected
font face.
However, there are many font families that only normal
upright styles are provided (without bold, oblique styles).
Some people want to synthesize embolden/slanted typeface
from normal upright typeface, so FT2 provides
FT_GlyphSlot_Oblique(), FT_GlyphSlot_Embolden() etc.
For detail, please check src/base/ftsynth.c.
Regards,
mpsuzuki