Sven Neumann schrieb:
>> If I replace the Unicode by the Glyph Index, it works:
>>
>> unsigned int character = 223;
>> surface->DrawGlyph(surface, character, 0, 0, (DFBSurfaceTextFlags)0);
>>
>> DFFA_NOCHARMAP is never used, and all encodings are UTF-8.
>> Why I can't use UTF-8 codes with DrawGlyph, what's wrong?
>>     
>
> Nothing is wrong. DrawGlyph takes the Unicode character index, not an
> UTF-8 encoded string. That's the API. If you need something different,
> it shouldn't be difficult to write a small wrapper function.
>
>   
Ok. Than the API-Doc is not clear for me

<API Doc>
Draw a single glyph specified by its character code at the specified 
position with the given color following the specified flags.
/DrawGlyph (/
        IDirectFBSurface 
<http://www.directfb.org/docs/DirectFB_Reference/IDirectFBSurface.html>         
  
        ***     *thiz,*
        unsigned int            
        *character,*
        int             
        *x,*
        int             
        *y,*
        DFBSurfaceTextFlags 
<http://www.directfb.org/docs/DirectFB_Reference/types.html#DFBSurfaceTextFlags>
 
                
        *flags*
/);/


If font was loaded with the DFFA_NOCHARMAP flag, index specifies the raw 
glyph index in the font.
</API Doc>

This says for me: if the DFFA_NOCHARMAP flag is not given in the 
DrawGlyph call, character is an UTF-8 char, if DFFA_NOCHARMAP flag is 
given, character is an index.

Isn't it?

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to