Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions cdn/dev/css/template.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,20 @@ html {
src: url('//s.keyman.com/font/deploy/LateefRegOT.ttf') format("truetype");
}

@font-face {
font-family: Busra;
font-style: normal;
font-weight: normal;
src: url('//s.keyman.com/font/deploy/Busra-Regular.ttf') format("truetype");
unicode-range: U+1780-17FF, U+19E0-19FF;
}

/* Khmer */
:lang(km) {
/* The browser will automatically use Busra for Khmer chars and Cabin or Sans-serif for others */
font-family: 'Busra','Cabin', sans-serif;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. For maintainability, can we move this alphabetically before Lao (line 289)?

  2. I don't know CSS. Are Cabin and sans-serif already handled in line 173? (I note the other languages only reference one font for family, and not in quotes)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try removing the two fonts to see if Busra is working properly or not. I added the Unicode range after font-family so this might fix it without having to specify three fonts.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got the answer now. The Cabin and sans-serif fonts are there as a fallback for other characters that aren't Khmer.

Since I use lang(km) to recognize the km in the URL (http://keyman.com.localhost:8053/km/keyboards/?q=k&x=0&y=0) to trigger a font change, it changes the font for the entire web page.

Busra font:
Screenshot 2026-05-22 at 5 02 50 in the afternoon

keyman.com:
Screenshot 2026-05-22 at 5 03 17 in the afternoon

Whereas the other font-family properties are being used for .lang-example selectors, so it does not impact any other elements; therefore, one value for font-family is enough.

/* Amharic */
:lang(amh).lang-example {
font-family: GeezWeb;
Expand Down
Loading