Skip to content

Commit

Permalink
Set default font to Noto Sans (#618)
Browse files Browse the repository at this point in the history
* Set default font to Noto Sans

* Make D2Coding to fallback font

* Update CHANGELOG.md

* Add font to `Recommends` for deb package
  • Loading branch information
Riey authored Jan 16, 2023
1 parent 695c148 commit eb4aad1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Update configuration.md
* Correct scan code to properly recognize F11 and F12 key
* Fix KDE plasmashell crash #609
* Set default font to `Noto Sans CJK KR`

## 3.0.1

Expand Down
4 changes: 2 additions & 2 deletions res/default_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ engine:
Tab:
behavior: Commit
result: ConsumeIfProcessed
candidate_font: D2Coding
candidate_font: Noto Sans CJK KR
xim_preedit_font:
- D2Coding
- Noto Sans CJK KR
- 15.0
latin:
layout: Qwerty
Expand Down
1 change: 1 addition & 0 deletions scripts/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Homepage: https://github.com/Riey/kime
Section: utils
Priority: optional
Architecture: %ARCH%
Recommends: fonts-noto-cjk
4 changes: 2 additions & 2 deletions src/engine/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ impl Default for EngineConfig {
Key::normal(KeyCode::Tab) => Hotkey::new(HotkeyBehavior::Commit, HotkeyResult::ConsumeIfProcessed),
},
},
xim_preedit_font: ("D2Coding".to_string(), 15.0),
candidate_font: "D2Coding".to_string(),
xim_preedit_font: ("Noto Sans CJK KR".to_string(), 15.0),
candidate_font: "Noto Sans CJK KR".to_string(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Config {

let load_font = |name| {
db.query(&Query {
families: &[Family::Name(name), Family::Serif],
families: &[Family::Name(name), Family::Name("D2Coding")],
..Default::default()
})
.and_then(|id| db.with_face_data(id, |data, index| (data.to_vec(), index)))
Expand Down

0 comments on commit eb4aad1

Please sign in to comment.