Apply suggestions from code review

Co-authored-by: Marc Durdin <marc@durdin.net>
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
This commit is contained in:
Eberhard Beilharz 2026-07-03 17:23:19 +02:00 committed by GitHub
parent 1191e4387f
commit 1867a7659f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View file

@ -39,8 +39,8 @@ The following script illustrate the use of `getFontTypeface()`:
``` java
KMTextView textView = (KMTextView) findViewById(R.id.kmTextView);
Typeface fontTypeface = KMManager.getFontTypeface(this,
getDir("data", Context.MODE_PRIVATE).toString() + File.separator + "aava1.ttf");
String textFontFilename = KMManager.getKeyboardTextFontFilename();
Typeface fontTypeface = KMManager.getFontTypeface(this, textFontFilename);
textView.setTypeface(fontTypeface);
```

View file

@ -16,7 +16,14 @@ KMManager.getKeyboardOskFontFilename()
### Returns
Returns the selected keyboard's OSK font filename and full path as
`String` if it has any, empty string otherwise.
`String` if it has any, empty string otherwise. Note that the
on-screen keyboard will fallback to the keyboard text font if
no OSK font is specified.
The OSK font should not be used for a text view, because some
OSK fonts are appropriate for use only in the on screen keyboard;
see [`&displayMap`](/developer/language/reference/displaymap) for
reference.
## Description