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

LaTeX: Add font scaling option to package #3

Merged
merged 1 commit into from Sep 27, 2017
Merged

Conversation

@abhabongse
Copy link
Contributor

@abhabongse 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.
*  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
Copy link
Contributor

@thep 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
Copy link
Contributor

@thep 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 font-scaling branch Sep 27, 2017
@abhabongse abhabongse restored the font-scaling branch Sep 27, 2017
@abhabongse
Copy link
Contributor Author

@abhabongse abhabongse commented Sep 27, 2017

I agree that scale makes more sense than scaled.

@abhabongse abhabongse deleted the font-scaling branch Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants