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

Stylo: Implement font-kerning #13667

Closed
wafflespeanut opened this issue Oct 10, 2016 · 2 comments · Fixed by #13751
Closed

Stylo: Implement font-kerning #13667

wafflespeanut opened this issue Oct 10, 2016 · 2 comments · Fixed by #13751
Labels
A-content/css Interacting with CSS from web content (parsing, serializing, introspection) A-stylo E-less-complex Straightforward. Recommended for a new contributor.

Comments

@wafflespeanut
Copy link
Contributor

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
@wafflespeanut wafflespeanut added A-content/css Interacting with CSS from web content (parsing, serializing, introspection) E-less-complex Straightforward. Recommended for a new contributor. A-stylo labels Oct 10, 2016
@highfive
Copy link

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

@Manishearth
Copy link
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>

bors-servo pushed a commit that referenced this issue Oct 14, 2016
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
Labels
A-content/css Interacting with CSS from web content (parsing, serializing, introspection) A-stylo E-less-complex Straightforward. Recommended for a new contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants