Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Kerning #1

Open
kdchambers opened this issue Dec 28, 2022 · 1 comment
Open

Implement Kerning #1

kdchambers opened this issue Dec 28, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@kdchambers
Copy link
Owner

I regressed Kerning support due to the aggressive API changes. All the hard stuff should already be in place but it should be verified to working by comparing against Harfbuzz results and using a couple of different fonts.

@kdchambers kdchambers added the enhancement New feature or request label Dec 28, 2022
@kdchambers kdchambers added this to the 0.1.0 milestone Dec 28, 2022
@kdchambers
Copy link
Owner Author

This is turning out to be troublesome for Harfbuzz. I've tried various fonts and hb_buffer_get_glyph_positions is not returning values with kerning. Drawing a string such as "Y.YWYAYHYTY", x_advance will always return the same value for 'Y'.

I tried enabling additional harfbuzz features but couldn't elicit a change. Code for reference.

const gpos_feature = harfbuzz.Feature {
    .tag = harfbuzz.makeTag("GPOS"),
    .value = 1,
    .start = harfbuzz.feature_global_start,
    .end = harfbuzz.feature_global_end,
};
const kern_feature = harfbuzz.Feature {
    .tag = harfbuzz.makeTag("kern"),
    .value = 1,
    .start = harfbuzz.feature_global_start,
    .end = harfbuzz.feature_global_end,
};
const features = [_]harfbuzz.Feature {
    gpos_feature,
    kern_feature,
};
impl.hbShapeFn(impl.harfbuzz_font, buffer, &features, features.len);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant