mirror of
https://github.com/readest/readest.git
synced 2026-05-03 14:00:54 +00:00
feat: retrieve system fonts on iOS and Android and show font weight variants, closes #949 and closes #557 (#976)
This commit is contained in:
parent
9303ec8c5f
commit
a424ae8b15
25 changed files with 254 additions and 84 deletions
|
|
@ -47,4 +47,13 @@ impl<R: Runtime> NativeBridge<R> {
|
|||
pub fn get_status_bar_height(&self) -> crate::Result<GetStatusBarHeightResponse> {
|
||||
Err(crate::Error::UnsupportedPlatformError)
|
||||
}
|
||||
|
||||
pub fn get_sys_fonts_list(&self) -> crate::Result<GetSysFontsListResponse> {
|
||||
let font_collection = font_enumeration::Collection::new().unwrap();
|
||||
let mut fonts = Vec::new();
|
||||
for font in font_collection.all() {
|
||||
fonts.push(font.font_name.clone());
|
||||
}
|
||||
Ok(GetSysFontsListResponse { fonts, error: None })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue