Compiling version 11 beta

The & character is used to mark an underline on the next character, showing which key can be pressed as a shortcut to activating that menu item.

  1. I will update all font references in xmls, css of Tahoma and Calibri to SK_UIFontName

And all locale SK_UIFontName would be changed from Tahoma to Calibri

This should make all latin texts and locale to use Calibre.

I have an idea to fix the latin text issue in the locale for Kannada, What if we input Calibri, "Noto Sans Kannada" as the string
or
Calibri", "Noto Sans Kannada
I think it will work. I will try to pass that string.

  1. I think you are understanding the problem. The menu items with short cut letters as the first letter of string are treated as ‘a href’ I think. By default ‘a href’ class uses blue color. and also it is not using the Noto Sans Kannada from the locale. If I remove the shortcut, then they will be black color and use Noto Sans Kannada.

    Perhaps, the keyboard list is having the problem of finding the right font with Latin. Which I can test by passing both fonts and verify.

Please check again.

And in
TClearTypeDrawCharacter.SelectFallbackFont, can we hardcode cftcode2000, 2001, and 2002 to Calibri?

  1. The colour issue is not related to a href because the menu is not a HTML page. It is definitely related to the Noto Sans Kannada font including only characters from the Kannada range.

I think it makes sense to fall back to Calibri or even better to allow the system to select an appropriate fallback font. When this code was written, Windows XP was still dominant and font fallback was rudimentary, and font smoothing, so useful for complex script fonts on low resolution screens, comes by default.

It involves a fair bit more effort to get that code tidied up. We should allow the renderer to do the hard work and simplify the entire code path, removing all the complex rendering code; now that we have a minimum version of Windows 7, that will be perfectly fine. I’m not sure if that is too much work for you :wink:

I have set the font to “Calibri” in Kannada locale.

Here is the output.

image

It is related to the first letter is ’ & amp ; ’ or not

Here is a another scenario, I have dropped ’ & amp ; ’ in front of “ಪಠ್ಯ ಸಂಪಾದಕ” Text Editor

See the difference

image

I missed this part.

I can surely try.

I missed your message. I was hung up on the href. My bad.
TClearTypeDrawCharacter.SelectFallbackFont

procedure TClearTypeDrawCharacter.SelectFallbackFont(Handle: THandle; const Text: WideString);
var
uc: DWord;
begin
try
uc := Char.ConvertToUtf32(Text, 0); // I3310
except
on E:EArgumentOutOfRangeException do
uc := $FFFD; // Not a character, invalid Unicode
end;
** if uc < $10000 then SelectFont(Handle, ctfCode2000)**
** else if uc < $20000 then SelectFont(Handle, ctfCode2001)**
** else if uc < $30000 then SelectFont(Handle, ctfCode2002)**
** else**
** begin**
** SelectFont(Handle, ctfSelected);**
** Exit;**
** end;**
** SetTextColor(Handle, ColorToRGB(clBlue));**
end;

We can drop the highlighted code.

If you think this is easier solution. I could compile it and test it, before making a pull request.

I am reading thru the procedure further. I see, it can be made much more simpler by removing all the redundancies procedures. Specially, with the knowledge system will pick a font, in case the font declared is not available.

Also,

I am not successful in changing the font style the title text for the configuration window

image

I have tried to add font-style to title block, it’s not helping the cause.

Title of none of the windows are picking the font from SK_UIFontName

Please help

image

The titles of windows are rendered by Windows itself and use the system default font. This is not really in scope of what we can change in Keyman at this time.

1 Like

@Marc please check the changes in CleartypeDrawCharacter.pas
I have build and tested on windows 7 and 10.
It is good to go.
I have tested with font installed and without font installed.
Without font installed condition, windows uses system default font.

Okay, will review this soon – am in the 11.0 release cycle right now so frozen on code changes until that is complete.

The issue on this topic had been resolved.
Respectfully, due to the inactivity of the conversation, this topic is now closed for any further discussion.
Please feel free to create a new topic if there are any questions or if the issue persists.