Implement fallback priorities and han unification on Unix
This commit is contained in:
parent
63680b5696
commit
7e08a63796
13 changed files with 290 additions and 51 deletions
|
|
@ -1,5 +1,7 @@
|
|||
use std::{collections::HashMap, sync::Mutex};
|
||||
|
||||
pub mod fallback;
|
||||
|
||||
pub use self::cache::*;
|
||||
mod cache;
|
||||
|
||||
|
|
@ -34,7 +36,7 @@ impl FontLineIndex {
|
|||
}
|
||||
|
||||
pub struct Font<'a> {
|
||||
pub name: &'a str,
|
||||
pub info: &'a fontdb::FaceInfo,
|
||||
pub data: &'a [u8],
|
||||
pub index: u32,
|
||||
pub rustybuzz: rustybuzz::Face<'a>,
|
||||
|
|
@ -50,9 +52,9 @@ pub struct Font<'a> {
|
|||
}
|
||||
|
||||
impl<'a> Font<'a> {
|
||||
pub fn new(name: &'a str, data: &'a [u8], index: u32) -> Option<Self> {
|
||||
pub fn new(info: &'a fontdb::FaceInfo, data: &'a [u8], index: u32) -> Option<Self> {
|
||||
Some(Self {
|
||||
name,
|
||||
info,
|
||||
data,
|
||||
index,
|
||||
rustybuzz: rustybuzz::Face::from_slice(data, index)?,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue