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

Stylo: Implement font-kerning #13667

Closed
wafflespeanut opened this Issue Oct 10, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@wafflespeanut
Member

wafflespeanut commented Oct 10, 2016

Please go through the guide before working on this issue.

font-kerning is a keyword property which takes one of the following values: auto | normal | none. The default value is auto. The linked MDN has more information about this.

The constant prefix you should be using is NS_FONT_KERNING

You will need to manually implement the glue, see https://github.com/servo/servo/pull/13570/files for an example of this.

Code: servo/components/style/properties/longhand/font.mako.rs

  • Use the example from the MDN page.
  • Build stylo and screenshot how the example looks before your changes.
  • Make your changes, build stylo and screenshot how it looks after.
  • Open a PR with your changes and attach the screenshots
@highfive

This comment has been minimized.

highfive commented Oct 10, 2016

Please make a comment here if you intend to work on this issue. Thank you!

@Manishearth

This comment has been minimized.

Member

Manishearth commented Oct 10, 2016

Make sure the MDN example has visible kerning. You may need to tweak the font to get this to work. If the MDN example shows no kerning difference between the two example lines, try the following HTML example:

<style type="text/css">

div {
  font-size: 2rem;
  font-family: arial;
}

#nokern {font-kerning: none;}
#kern {font-kerning: normal;}
</style>

<div id=kern>
AV T. ij
</div>

<div id=nokern>
AV T. ij
</div>

@joewalker joewalker referenced this issue Oct 13, 2016

Merged

Add support for 'font-kerning' in geckolib #13751

1 of 1 task complete

bors-servo added a commit that referenced this issue Oct 14, 2016

Auto merge of #13751 - joewalker:font-kerning, r=Manishearth
Add support for 'font-kerning' in geckolib

Add support for 'font-kerning' in geckolib
These changes fix #13667

    $ ./mach build -d
    It looks like you passed an unrecognized argument into mach.

    $ ./mach test-tidy
    It looks like you are trying to run an unknown mach command: test-tidy

I'm clearly doing something wrong here, but I'm not sure what

- [x] These changes do not require tests because "[For stylo it's okay to not have tests since many of the reftests fail due to unrelated reasons](#13570 (comment))" :)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13751)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment