TRichViewEdit
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I hate to say it, but this problem cannot be fixed immediately.
TRichView uses WinAPI function GetCharacterPlacement, and it fails it this case, so TRichView falls back to non-bidi aware methods of drawing selection.
We plan to implement a basic support of Uniscribe in this year, but we need to complete some other work before, so it will require time.
TRichView uses WinAPI function GetCharacterPlacement, and it fails it this case, so TRichView falls back to non-bidi aware methods of drawing selection.
We plan to implement a basic support of Uniscribe in this year, but we need to complete some other work before, so it will require time.
It's not limited to the same vowel. Any illegal combination that causes the circular dotted character will cause the caret to go to the start of the line.
Also just spotted that if you are entering Hindi, you have to make sure you have selected the correct font otherwise the caret does not move at all.
Also just spotted that if you are entering Hindi, you have to make sure you have selected the correct font otherwise the caret does not move at all.
You are right. Its not just Hindi, it happens with any language if the font does not support the unicode characters. Instead of displaying boxes or using the fallback unicode font for the language the caret just sits.
If you change the font to a correct one later you can see that the characters were entered properly. A work around would be to manually detect the unicode range of the incoming characters and compare against selected font and use the fallback font if the range is not supported. But it would be an additional task and it could be done neater if the component did it internally.
Most of the time the dotted characters appear when a diacritic mark is entered without a suitable character. In my case it is usually a vowel and the work around for the double vowels I describe in the previous post reduces the problem with them significantly.
If you change the font to a correct one later you can see that the characters were entered properly. A work around would be to manually detect the unicode range of the incoming characters and compare against selected font and use the fallback font if the range is not supported. But it would be an additional task and it could be done neater if the component did it internally.
Most of the time the dotted characters appear when a diacritic mark is entered without a suitable character. In my case it is usually a vowel and the work around for the double vowels I describe in the previous post reduces the problem with them significantly.
Microsoft Word will select a default font when you select a different keyboard language. This is useful for determining which font to use for which language.
When it comes to Uniscribe, one of the routines checks for a valid font for the text supplied, if it fails your program just selects the default font. That way you can just select Arial and type any language. The user thinks its Arial but what is displayed may not be.
When it comes to Uniscribe, one of the routines checks for a valid font for the text supplied, if it fails your program just selects the default font. That way you can just select Arial and type any language. The user thinks its Arial but what is displayed may not be.
Yes, Word and other software does this using the font fallback mechanism. It is part of the Uniscribe system.
This msdn article describes the process for an application to use the font fallback mechanism.
http://msdn.microsoft.com/en-us/library ... s.85).aspx
The default fallback fonts are hard coded in the Uniscribe system and cannot be changed.
This msdn article describes the process for an application to use the font fallback mechanism.
http://msdn.microsoft.com/en-us/library ... s.85).aspx
The default fallback fonts are hard coded in the Uniscribe system and cannot be changed.
You can find it here http://msdn.microsoft.com/en-us/goglobal/bb688134.aspx
The last line of the section on font fallback
The last line of the section on font fallback
I haven't seen an official list of the fallback fonts. I don't think it has been made public by Microsoft. [/quote]"Font fallback is internal to Uniscribe, and applications cannot add new fallback fonts or modify existing ones."
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
The described problems are the reason why bidirected text is not supported by default. GetCharacterPlacement (used for support of biditext) is a very capricious function. And the worst of all, in the most of cases it's not possible to determine when it fails.
Actually, it is required for Arabic an Hebrew text only.
And WinAPI does not allow to configure font fallback (it seems it is activated only for text strings having some specific characters).
Unfotunately, we are very busy to complete current works (such as DocX export, and RVMedia), so we cannot start working on Uniscribe support right now.
Actually, it is required for Arabic an Hebrew text only.
And WinAPI does not allow to configure font fallback (it seems it is activated only for text strings having some specific characters).
Unfotunately, we are very busy to complete current works (such as DocX export, and RVMedia), so we cannot start working on Uniscribe support right now.
The time scale is not a problem for me. I have about a year before I start to panic.
I'm not sure I understand about automatic font fallback with Uniscribe. I have always checked for missing Glyphs after the call to ScriptShape and then adjusted the font if necessary. Still that will be your problem to solve, not mine. Maybe I was supposed to perform some function before ScriptShape to determine if my font was valid.
One of the things you will have to watch out for is complex characters. Sometimes a single character is made up of multiple Unicode values.
When in doubt, see how Microsoft Word handles the situation. They seem to have got their act together now regarding complex languages.
I'm not sure I understand about automatic font fallback with Uniscribe. I have always checked for missing Glyphs after the call to ScriptShape and then adjusted the font if necessary. Still that will be your problem to solve, not mine. Maybe I was supposed to perform some function before ScriptShape to determine if my font was valid.
One of the things you will have to watch out for is complex characters. Sometimes a single character is made up of multiple Unicode values.
When in doubt, see how Microsoft Word handles the situation. They seem to have got their act together now regarding complex languages.