bug(developer): Review of KM Developer display and compiled fonts
- Dominant language
- Pascal
- Stars
- 534
- Forks
- 143
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 113
Description
# KM Developer Font Review
After a discussion mentioning line-height, I wanted to test using Andika Compact to see if it made a difference in line height in modern Keyman. In doing so, I realized that I didn't know the necessary location/combination to change/test the Touch font and I stumbled upon the fact that the font doesn't update inside the web preview unless switching to Design view. You know me, I ended up doing an unsolicited review of the various font settings in KM Developer and what they did (or didn't do) like the one I did for reported platforms. As it turns out, there are at least 13 different filelds (that I found) to define fonts in KM developer.
The default code font (Consolas) contains all my characters and I had set my keyboard font everywhere it might need to be, so I didn't realize the inconsistency before. If someone had a reason to use a different font for OSK and Touch, they cannot do that inside a keyboard in KM Developer (but It seems they can in a package).
The good news is that for compiled packages, everything works as expected, but fonts for editing and compiled keyboards have become very inconsistently applied. I realize that Developer is getting less attention these days, but this might be worth a look. The interface/code display bugs seem less critical than than getting the expected fonts on the Web Testing Platform.
Tested on KM Developer 17.0.335 (Stable).
## Places to set Fonts in Keyman Developer
### 1. (In a Keyboard) Touch Layout > Code View (`"font": "Andika Afr",`) _or_ Keyboard Menu > Fonts > Touch Layout
Notes:
- ❌ Touch font not configurable in Design view, only from menu or code.
Effect:
- ✅ Touch Layout Design view
- ❓ Does not affect Touch Layout Code view (not sure if it should, but see other ❓ below).
- ❌ Appears in the second part of the locally-compiled keyboard .JS file (but overridden by the font on Touch).
### 2. On-screen Keyboard > Code View (``) _or_ Keyboard Menu > Fonts > On Screen Keyboard
Note:
- ❌ When edited in code, only applies anywhere (including Web preview) after toggling from code back to design. Compiling does not seem to trigger caching of the OSK for the compiler.
- ❌ OSK font not configurable in Design View, only from menu or code.
Effect:
- ✅ Affects Developer OSK Design View (on switching to Design view)
- ❓Affects Developer OSK Code view's unquoted literal text (`10.0`) after switching to Design and back to Code
- ❌ In the first part of the locally-compiled .JS file (overrides the Font on Touch).
- ✅ Browser Web Testing, Mobile Emulation: Applies
- ❌ Browser Web Testing, Desktop Emulation: Applies, but should be the OSK font.
### 3. Tools > Options > Editor > Default Font
Note:
- ❌ Setting seems to be lost on KM Developer Restart, resets to Consolas.
**Effect:**
- ❌ I can't find any effect.
### 4. Tools > Options > Editor > Quoted Font
**Note:**
- ✅ The setting sticks on restarting KM Developer.
**Effect:**
- ❌ I still can't find any effect.
### 5. View Menu > Character Font _or_ Keyboard Menu > Fonts > Debugger, Editor Characters
**Note:**
- ❌ Names of this value are inconsistent.
**Effect:**
- ❌ Only affects blue (reserved word) text in Layout Code View, not quoted text.
- ❌ No Effect on OSK Code View (Literal text is overridden by font in the OSK code after switching to design and back.)
- ❌ Touch Layout Code View: No effect
- ❌ Embedded CSS View: No effect
- ✅ Affects Keyboard > Test Keyboard
- ✅ Affects Debug > Start Debugging
- ❓ Package Source Code: Applies only to black (literal unquoted text).
### 6. View Menu > Code Font _or_ Keyboard Menu > Fonts > Text Editor Code
**Effect:**
- ❓OSK Code View: Affects all text except literal unquoted text (which is overridden by font in the OSK code after switching to design and back.)
- ✅ Touch Layout Code: Affects all text except quoted text.
- ❌ Layout Code View: Affects all non-blue code in
- ❌ No effect in CSS View.
- ❓ Package Source Code: Applies to all text except black (literal unquoted text).
### 7. (In a Package) > Keyboard Tab > Keyboard Font
**Note:**
- ✅ Works as expected.
**Effect:**
- ✅ Affects Touch on Locally Compiled Packages
- ✅ Affects Touch on Server-Compiled Packages
### 8. (In a Package) > Keyboard Tab > Display Font
**Effect:**
- ✅ Works as expected.
**Effect:**
- ✅ Affects OSK on Locally Compiled Packages
- ✅ Affects OSK on Server-Compiled Packages
### 9. Embedded CSS
**Note:**
- ✅ Works as expected.
**Effect:**
- ✅ Overrides Touch Font on all outputs with correct selectors.
- ✅ Overrides OSK Font on all outputs with correct selectors.
## Other Oddness
I can pinch-zoom (2 fingers on the mouse) in a code window, but I can't zoom back out by pinching. I have to restart KM Developer to reset zoom.
Contributor guide
Assessment
This issue has not been assessed yet.