[Lazarus] Carbon: UTF8 and few component showing rect characters

EarMaster - Bent Olsen bent at earmaster.com
Tue Oct 14 11:18:42 CEST 2008


Thanks, I found GetThemeFont from the unit Appearance, which returns the
system font (in this case 'Lucida Grande'), but changing TLabel to this font
didn't had the expected effect.

I'm more convinced now that Lazarus, at least for Carbon, doesn't fully
support UTF8. If you take a TLabel and set its caption to

印刷

which means Print (I hope this looks right in this mail), and as long as you
have the focus at its caption in Lazarus Object Inspector the text displays
right (the InEdit or alike supports this), but as soon as you remove the
focus away from the property, the text displays in rectangles in the
Inspector grid.

I presume the native controls like TEdit in Carbon uses the system font, but
how come there's this difference when using the same font name? Does the
native controls automatically switch to Japanese fonts like "Hiragino" when
they encounter Japanese characters?

This is a major setback, because this goes for all drawings of texts on
canvases as well.

I'm using Lazarus v0.9.27, FPC 2.2.2, rev 16907, on i386-darwin-carbon, but
do I need to rebuild Lazarus with some option to support UTF8. I read
Lazarus supports UTF8, so this looks more of a font issue, and a way of
dealing with characters, which is not supported for a current font.

Thanks again,
Normann

> Apple developers mailing lists (lists.apple.com) are also rich in
discussion of such problems.
> It's good practise to search aboutr carbon problems there:
>
> i.e.: this thread, is cocoa based application, but still might be useful:
> http://lists.apple.com/archives/java-dev/2002/Nov/msg00072.html I'm
> pretty sure, that there're some discussions about carbon too.
>
> may be you can check if font supports some Unicode
> features:http://developer.apple.com/documentation/Carbon/
> Conceptual/ATSUI_Concepts/atsui_app_features/chapter_9_section_1.html






More information about the Lazarus mailing list