# LaTeX: Add font scaling option to package #3

Merged
merged 1 commit into from Sep 27, 2017

## Conversation

Projects
None yet
2 participants
Contributor

### abhabongse commented Sep 12, 2017 • edited

 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.```
``` faf2c3b ```
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?

Contributor

### thep commented Sep 27, 2017

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

Contributor

### abhabongse commented Sep 27, 2017

 I agree that `scale` makes more sense than `scaled`.