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

Add support for small-caps font-variant. #3459

Merged
merged 2 commits into from Sep 23, 2014
Merged

Add support for small-caps font-variant. #3459

merged 2 commits into from Sep 23, 2014

Conversation

@glennw
Copy link
Member

glennw commented Sep 23, 2014

Ref: #2554.

Ref: 2554.
@hoppipolla-critic-bot
Copy link

hoppipolla-critic-bot commented Sep 23, 2014

Critic review: https://critic.hoppipolla.co.uk/r/2668

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@glennw
Copy link
Member Author

glennw commented Sep 23, 2014

descriptor: FontTemplateDescriptor, pt_size: f64,
variant: font_variant::T) -> Font {
let actual_pt_size = match variant {
font_variant::small_caps => pt_size * 0.7,

This comment has been minimized.

Copy link
@pcwalton

pcwalton Sep 23, 2014

Contributor

Where does 0.7 come from? Maybe this should be a constant?

This comment has been minimized.

@glennw
Copy link
Member Author

glennw commented Sep 23, 2014

Real small caps is quite a bit more work - added a todo comment. The scale factor was what webkit uses - updated it to be a constant and use the same value Fx uses.

@pcwalton
Copy link
Contributor

pcwalton commented Sep 23, 2014

r+

glennw added a commit that referenced this pull request Sep 23, 2014
Add support for small-caps font-variant.
@glennw glennw merged commit 98222cf into servo:master Sep 23, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@glennw glennw deleted the glennw:small-caps branch Sep 23, 2014
@burg burg mentioned this pull request Aug 30, 2015
3 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.