|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Is it BUG???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??? OK, lets think what the FT_Get_Kerning working. I know what its api return kerning from glyps, which be a member of the same face. But, what do when glyps from distinct faces? 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??? And final question - how to apply "italic" style in font collection? P.S.: Sorry, english is't my native language.... _______________________________________________ Freetype-devel mailing list Freetype-devel@... http://lists.nongnu.org/mailman/listinfo/freetype-devel |
|
|
Re: Is it BUG???Hi,
On Wed, 26 Aug 2009 15:57:21 +0300 Z3N <1337z3nhxr@...> 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 _______________________________________________ Freetype-devel mailing list Freetype-devel@... http://lists.nongnu.org/mailman/listinfo/freetype-devel |
|
|
Re: Is it BUG???Hi!Hi, On Wed, 26 Aug 2009 15:57:21 +0300 Z3N 1337z3nhxr@... wrote: Oh, please give a name for any free font to reproduce your problem.Thanks, you help me. After reading you letter I'm use debugger to solve problem. I'm think what FT_Get_Kerning always return 0... this is my mistake. Not always, just in most cases. Good experience for me.... I'm have some new question. How to add digits in 16.16, or 26.6 format??? a>>6+b>>6 - not usefull. With best regards, Z3N _______________________________________________ Freetype-devel mailing list Freetype-devel@... http://lists.nongnu.org/mailman/listinfo/freetype-devel |
|
|
Re: Is it BUG???On Thu, 03 Sep 2009 16:18:34 +0300
Z3N <1337z3nhxr@...> wrote: >I'm have some new question. How to add digits in 16.16, or 26.6 >format??? a>>6+b>>6 - not usefull. I'm not sure what you want to do. In the calculation "a>>6 + b>>6", what are a and b? Both of a and b are 26.6 fixed point values and you want to obtain the integer result? Here I quote a few macros in include/freetype/internal/ftcalc.h... #define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 ) #define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 ) #define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 ) #define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) << 2 ) #define FLOAT_TO_FIXED( x ) ( (FT_Long)( x * 65536.0 ) ) #define FIXED_TO_INT( x ) ( FT_RoundFix( x ) >> 16 ) #define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \ : ( -( ( 32 - (x) ) & -64 ) ) ) Regards, mpsuzuki _______________________________________________ Freetype-devel mailing list Freetype-devel@... http://lists.nongnu.org/mailman/listinfo/freetype-devel |
|
|
Re: Is it BUG???Hi!On Thu, 03 Sep 2009 16:18:34 +0300 Z3N 1337z3nhxr@... wrote: I'm want add two values in 26.6 formatI'm not sure what you want to do. a in format 26.6 b in format 26.6 a+b=HOW? Regards,Z3N _______________________________________________ Freetype-devel mailing list Freetype-devel@... http://lists.nongnu.org/mailman/listinfo/freetype-devel |
|
|
Re: Is it BUG???> I want add two values in 26.6 format > a in format 26.6 > b in format 26.6 > a+b=HOW? Simply add them! Werner _______________________________________________ Freetype-devel mailing list Freetype-devel@... http://lists.nongnu.org/mailman/listinfo/freetype-devel |
| Free embeddable forum powered by Nabble | Forum Help |