Skip to content

Mark to Mark placement #102

Answered by solomancode
solomancode asked this question in Q&A
Discussion options

You must be logged in to vote

@wezm I appreciate your response, Below my implementation. I'm not sure if my configuration is correct, please feel free to point out if there is something that I'm missing.

pub fn word_glyphs(font_data: Vec<u8>, word: &str) -> WordGlyphs {
    let scope = ReadScope::new(&font_data);
    let font_file = scope.read::<FontData<'_>>().expect("corrupt font data");
    let provider = font_file.table_provider(0).expect("error: table provider");
    let mut font = Font::new(provider).unwrap().expect("cmap missing");

    let glyphs = font.map_glyphs(word, tag::ARAB, MatchingPresentation::NotRequired);

    let script = tag::from_string("arab").unwrap();
    let lang = tag::from_string("ara").unwrap

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@solomancode
Comment options

@wezm
Comment options

@solomancode
Comment options

Answer selected by solomancode
Comment options

You must be logged in to vote
1 reply
@wezm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants