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

LaTeX: Add font scaling option to package #3

Merged
merged 1 commit into from Sep 27, 2017

Conversation

Projects
None yet
2 participants
@abhabongse
Contributor

abhabongse commented Sep 12, 2017

Rationale:
When fonts in this package is used in conjunction with other Latin fonts, there may be discrepancies in font sizes. If we can scale the size of fonts in this package, such issue would be solved. This idea is inspired by many font packages such as opensans and roboto, etc.

Changes:

  • Font definition files (*.fd) are modified so that they can be scaled by a factor as specified by the command \fontstlwg@scale if it is defined. The syntax used is according to the documentation fntguide.
  • The LaTeX package fonts-tlwg.sty is modified so that the command \fontstlwg@scale can be set through package option scaled. It is documented in the file README.latex.
  • The package xkeyval is used to allow this package to accept a value for the scaling factor, hence why \DeclareOptionX is used instead of \DeclareOption.
  • Tests are added to demonstrate how the scaling option can be used.
LaTeX: Add font scaling option to package
*  Font definition files (`*.fd`) are modified so that they can be scaled by a factor as specified by the command  `\fontstlwg@scale` if it is defined. The syntax used is according to the documentation [fntguide](https://www.ctan.org/pkg/fntguide?lang=en).
*  The LaTeX package `fonts-tlwg.sty` is modified so that the command `\fontstlwg@scale` can be set through package option `scaled`. It is documented in the file `README.latex`.
*  The package [xkeyval](https://www.ctan.org/pkg/xkeyval?lang=en) is used to allow this package to accept a value for the scaling factor, hence why `\DeclareOptionX` is used instead of `\DeclareOption`.
*  Tests are added to demonstrate how the scaling option can be used.
@thep

This comment has been minimized.

Show comment
Hide comment
@thep

thep Sep 26, 2017

Contributor

Thank you for your work! Before I try it, I think the "scaled" option should be "scale" (without "d") to be more intuitive. It's the common option between opensans ("scale") and roboto ("scaled" or "scale"). And users who are familiar with \includegraphics command should be already familiar with its "scale" option.

What do you think?

Contributor

thep commented Sep 26, 2017

Thank you for your work! Before I try it, I think the "scaled" option should be "scale" (without "d") to be more intuitive. It's the common option between opensans ("scale") and roboto ("scaled" or "scale"). And users who are familiar with \includegraphics command should be already familiar with its "scale" option.

What do you think?

@thep thep merged commit faf2c3b into tlwg:master Sep 27, 2017

@thep

This comment has been minimized.

Show comment
Hide comment
@thep

thep Sep 27, 2017

Contributor

Pull request merged, with option 'scaled' renamed to 'scale'. Thank you very much for your contribution!

Contributor

thep commented Sep 27, 2017

Pull request merged, with option 'scaled' renamed to 'scale'. Thank you very much for your contribution!

@abhabongse abhabongse deleted the abhabongse:font-scaling branch Sep 27, 2017

@abhabongse abhabongse restored the abhabongse:font-scaling branch Sep 27, 2017

@abhabongse

This comment has been minimized.

Show comment
Hide comment
@abhabongse

abhabongse Sep 27, 2017

Contributor

I agree that scale makes more sense than scaled.

Contributor

abhabongse commented Sep 27, 2017

I agree that scale makes more sense than scaled.

@abhabongse abhabongse deleted the abhabongse:font-scaling branch Sep 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment