|
From: Craig M. <cra...@sp...> - 2005-11-09 17:45:04
|
>> Maybe a more concrete question would help. Why doesn't the following
code
>> render the bullet glyph, but instead renders an empty box? The same
glyph
>> renders OK with the win32 DrawText function.
>>
>> const char* p = W2A(L"."); // Bullet glyph (in case e-mail corrupts)
>> while(*p)
>> {
>> const agg::glyph_cache* glyph = fman.glyph(*p);
>> ...
>> <rendering code here>
>> }
>Why don't you use it directly as wchar_t?
>const wchar_t* p = L"."; // Bullet glyph (in case e-mail corrupts)
>while(*p)
>{
> const agg::glyph_cache* glyph = fman.glyph(*p);
> ...
> <rendering code here>
>}
>fman.glyph(*p); accepts "unsigned" and can work with the 16 bit unicode.
>McSeem
I didn't realize that wchar_t* could be used by fman.glyph. I thought it
was looking for 2 chars per character as a char* array. Thanks for the
help.
This question was definitely kind of simplistic for a C/C++ question. I've
been in java land the last 4 years, and am just now re-acquainting myself
with the wonderful details of working with all of the varieties of strings
in c/c++/win32/mfc/atl/ole land. It is one of the few areas where I prefer
java to c/c++.
--Craig
|