C++ Builder Language Font is Broken? - delphi

I'm using C++ Builder 2010 and for some odd reason today when I opened my project all the non english font(aka korean font) turned into a box and when I try to retype them it still comes out as a box. I was wonder if anyone knows how to fix this

The box indicates that the text encoding is understood, but the font has no glyph for this particular character. You need a font that has support for the characters that you use.
The font used in the IDE's editor windows is specified in your preferences under: Tools > Options > Editor Options > Display.
You need to choose a font that supports the language in your code. It sounds like you did that once but somehow the setting has got lost, or perhaps the installed font has been modified.

Related

Firemonkey Unicode support for XP

Am developing a Delphi firemonkey desktop application with XE5.
I use Unicode characters to localize the application (Asian language call Sinhala).
Everything is perfect with windows 7 (We haven't tested it with Vista). But when we test it with windows XP, it display every character as a box (except in title bar).
What is the problem? Is delphi firemonkey support unicode in XP?
Is there any way to get it display correctly on XP?
(This happens only with firemonkey, everything is OK with VCL. Since am going to make it support for MAC, I have to use firemonkey.)
AFAIK FireMonkey does not implement the so-called Font fall-back mechanism. It does not use the Uniscribe API.
I suspect the font you are using (e.g. Tahoma) does not contain the needed characters in XP - whereas the TTF file included with Seven/Vista does contain them. So FireMonkey is not able to display the text as expected in XP.
Change the font to one having all needed glyphs. You may have "Arial Unicode MS" available, even on XP, if you have MSOffice installed.
By default, the VCL renderer uses the ExtTextOut GDI API which does implement font fall-back, so it automagically searches the installed fonts for the missing glyphs.
To properly use/display Unicode the OS has to support unicode strings and you have to have fonts installed that can display the Unicode characters. Since their are 65000+ characters not all font manufacturers include every Unicode character.
I think the FireMonkey app uses a font that does not contain Sinhala characters. Play with the font used by the app.
If you need a Sinhala font, the wonderful Alan Wood’s Unicode Resources has a section Large, multi-script Unicode fonts for Windows computers. The South Asian font page names several fonts you can try.
Alternatively, Googing "sinhala unicode font" will also give you plenty of suggestions.
I have checked all these suggestions - but there is no useful turnout of my problem. I have found out the following facts.
Changing the font to Arial MS Unicode or replacing Tahoma with a TTF file from Windows 7 doesn’t work.
Changing the font to “Iskole Pota”, a font which support Sinhala Unicode symbols , solved the problem for TEdit component.
All the components which are descendents of TTextControl don’t work with “Iskole Potha” solution.
I have further noticed that changing the font to something like “Wingdings” for TTextControl descendants don’t show appropriate symbols either. They still show English.

How to change the font size of the editor tabs in Delphi 2010 IDE?

Does anybody knows a way to change the font size of the editor tabs in Delphi 2010 IDE?
With my 1080p 22' monitor the font is too small to read and it causes pain in the eyes.
Some notes
It doesn't respect the system's DPI settings so changing that system setting doesn't help, moreover, I'm using 140% DPI already now, and it's Win7.
I couldn't find any existing 3rd party tools to tweak that.
I'll be willing to write an IDE expert to fix that problem if I know how to do it...
There is not an option to change the font size of these elements, but as you say this can be done writting an expert. Some time ago I started to write an Delphi IDE Expert (This project is not finished yet) which allow you to change the apparence of the Delphi IDE (here you can found the Source Code) , try using some of the code of this project to write your own. Check this image which shows the result of modify the code of the project to increase the font of the TIDEGradientTabSet.

VCL form and control font settings under Russian version of MS Windows

I have a Borland C++ Builder VCL app (so I am not working with Unicode yet),
I want to provide a simple translation of controls' caption text to Russian at runtime.
I can easily use EnumChildWindows to get the English caption, then lookup the translation and replace the caption text using SetWindowText. This does work well for my western European translations where I don't have to worry about the font.
But I am not sure how the Russian version of Windows and then VCL handles 8 bit cyrillic character sets.
Currently all the VCL controls have the font settings:
Charset=DEFAULT_CHARSET
name=MS Sans Serif
Am I correct in assuming that when my program is run under a Russian version of Windows the
character set will be cyrillic with the DEFAULT_CHARSET setting so I won't need to
change the font settings in all my controls?
If I do have to change the font (at run time), should the Windows API function SendMessage(hwnd,WM_SETFONT,(WPARAM)hFont,TRUE) work with VCL controls ?
I have tried using the CreateFont() and SendMessage(..WM_SETFONT..) with RUSSIAN_CHARSET and a cyrillic font face. This doesn't appear to have any effect,
it keeps the font that was set for the control in the form at design time
(even ANSI_CHARSET and a standard Windows-installed font face doesn't affect the controls' font) so I looking for confirmation that I won't have to change the font of the controls, or else tell me some VCL method for setting all the controls' font settings at runtime .
There is no need to reinvent the bicycle. Why don't you use Integration Translation Environment Tools which are provided with Borland C++Builder? There is a wizard that will help you with translations and will make a special resource file which will contain translation of all text strings in your application. Then program, will check system language and availible language resource files at startup, and will automatically use appropriate language. Check C++Builder help system with index - "Integrated Translation Environment (ITE)" for more detailed process description.

Localization of OS dialog boxes e.g. FileOpenDialog, etc

I am localizing my winform application for french and japenese. We have fileOpenDialog used at some places, when I change the CurrentUICulture to ja-JP or fr-FR, application displays the localized screens But the dialog boxes are shown in English, i.e default OS setting.
Is it not localizable ? or there is any alternative to it?
Thanks.
The Common File Dialogs and Common Item Dialogs are part of Windows itself and use the language of the underlying Windows installation. The only way to change their language is by reinstalling a different language variant of Windows.

Changing editor fonts in RAD Studio 2009

I can change the editor font in RAD Studio 2009 under the [Tools][Options] Editor Options/Display settings form, but the list of fonts is very limited and does not show all the installed fonts. Is there any way to add fonts to the selection ?
There is a work around by setting the font name in the registry, under [HKEY_CURRENT_USER\Software\CodeGear\BDS\6.0\Editor\Options].
You can only select fixed width fonts, so yes it is limited. A good resource for some fonts to try is available at Hivelogic.
Fonts are fixed width.
I have good experience with these fonts:
Courier New (default)
Consolas
Lucida Console
The last two are also great alternatives for Console fonts.
--jeroen

Resources