I have developed a bsk Keyboard with Perso Arabic script. It is working like a charm. However, I have a unique problem.
There is only one option for Font Size that would impact all the layers. I have a keyboard layer with only Arabic diacritics and it is very small, barely can be seen.
If I increase the font size for touch display in the keyboard then the non-diacritic characters go out of
view or break the keyboard due to the larger size. Is there any option I can increase the font size for only one key or one layer (The layer contain diacritic?
2 - I have another situation where I want to display Ű±Ù key and when a user presses this key, combination of U+0627 U+0628, it should output ۱Ù
I found the solution to the 2nd part of my question by myself, reading on the forum. it was fairly simple.
I changed the keyboard version to 15 from 10 in the keyboard code. like this.
and then used the key combination like this.
Yes, I have used multiple fonts. The stand alone diacritics are very small.
As is the case with the arabic characters, they are small, medium and large. One font size for all characters is not ideal. At least, font size on each layer based should be allowed.
For Font sizes,
We are used to using points (pts) for printed fonts (12pt for ânormalâ printed text, Arabic fonts are often illegible at 12pt and Iâve seen documents printed as high as 20pt.). The pt unit doesnât always map well to screens of different sizes.
Specifically, I would suggest using em units in your keyboard, which are proportional to the âdefaultâ size. This means that whatever the size of the overall keyboard font, the specific characters will be proportionally larger (or smaller).
1em means the default size. 1.5em means 50% larger, .5em means 50% smaller.
In CSS, 50% larger for your diacritic keycap would be:
Note: The CSS is applied only when the mobile keyboard is running (on your browser or phone), so you wonât see the size difference in Keyman Developer. If you want to see the same sizes in KMDev, you need to ALSO add a line to the key in the Touch layoutâs code editor. Below is one of my special keys in the code editor that is 80% (0.8em) of the normal font size (because it has three side-by-side-characters).
@Makara I thought I knew KM formatting inside and out, but learned something today. I thought that the fontsize code in used in KMDev was applied before the CSS in the live keyboard, but now I see that that is not (or is no longer) the case. The two are separate. Is that a recent change?
Not that Iâm a CSS expert, but I probably should be a better person to ask about that. Though⊠uh, Iâm not 100% clear on the observation and question. Are you saying that the fontsize code on the key is not applied at all within KeymanWeb outside of Keyman Developer testing? Or that itâs applied âafterâ rather than âbeforeâ? Is there a keyboard I should try in both places to see the difference?
Also, what version of Developer and of KeymanWeb are you using? Are you using 17.0 alpha versions or 16.0? Thereâs a chance some 17.0 changes could have had an unwanted side effect, with this as our first observation, so itâd help to know.
Iâm on 16.0.141. Screenshots are from SIL/Cameroon_Azerty
My T_CAM key (shown in the screenshot) is supposed to be 0.8em because it is several letters long. The in-code keyboard size
seems to only affect the touch-layout preview in the editor. I thought I remembered that it affected mobile, but in my testing, it does not. Maybe this code is deprecated, because itâs not configurable in the interface.
CSS affects the OSK and Touch keyboards, but has never been previewed inside KMDev.
Currently, I donât have CSS resizing set up. You could test with "fontsize: â.5emâ first to see if it makes it to the keyboard preview in your browser.
Then add a âfont-sizeâ style to my lines for T_CAM in the CSS and see what you get.