Page 1 of 1

[Suggestion] Allow FontWeight "aliases"

Posted: January 1st, 2018, 4:49 pm
by SilverAzide
Hello,
A suggestion for the String meter FontWeight option.... I know the standard usage everywhere is for this to be a numeric value, but I was wondering if it would be possible to allow using "aliases" for better readability or clarity.

For example, when I see "FontWeight=700", the first thing that occurs to me is... "what is 700 again? Bold, semi-bold...???".

It would be great if we could use descriptive text instead, like "FontWeight=Bold" or "FontWeight=Extra Light" (i.e., the descriptions shown in the docs). "Regular" and "Normal" would be just aliases for 400, for example. If you wanted fractional values, like 325 or something, you'd still use numbers instead of aliases.

Thanks for listening...

Re: [Suggestion] Allow FontWeight "aliases"

Posted: January 1st, 2018, 7:04 pm
by jsmorley
I personally think the descriptive names for font weights are not standardized enough to be useful for this. There really is no "standard" list of names, just a pretty wide variety of "common" ones that you see a lot. While we could map to the ones in the docs, that would still require using a reference to be sure you are using the right term (is it semibold or semi bold or semi-bold? You see all of those in font names).

Re: [Suggestion] Allow FontWeight "aliases"

Posted: January 2nd, 2018, 1:06 pm
by SilverAzide
Aww, man. Rejected on Day 1 of the new year. 2018 is not looking good. :-(

Re: [Suggestion] Allow FontWeight "aliases"

Posted: January 2nd, 2018, 2:08 pm
by jsmorley
SilverAzide wrote:Aww, man. Rejected on Day 1 of the new year. 2018 is not looking good. :-(
LOL...

I'm not opposed to the idea in principle, but I am skeptical that it is practical. If you poke around a bit, you will find that there are many, many names and variants of names for font weights. While we could easily standardize on a particular set of names, as we have in the documentation, I think folks are going to be jumping to the docs anyway to be sure they are using the right name, and that kinda defeats the purpose. As for memorizing them over time, sure... But isn't it just as easy to memorize the numbers?

At least for those who work in CSS, it seems like second nature to think of normal as 400 and bold as 700, since the numbers are what you use there. As for the less-used ones, I personally would have more trouble remembering that "Semi Bold" is heavier than "Medium", while the numbers 600 and 500 tell me that unambiguously.

Re: [Suggestion] Allow FontWeight "aliases"

Posted: January 2nd, 2018, 2:18 pm
by jsmorley
While I know you are not suggesting that names replace the numbers, I would point out that the numbers have the additional charm of being able to be mathematically manipulated. So you could have an ActionTimer measure that transitioned a weight from light to heavy, or have the value of a measure effect the weight.

Re: [Suggestion] Allow FontWeight "aliases"

Posted: January 2nd, 2018, 2:19 pm
by SilverAzide
OK, no problem... it's easy enough to just do FontWeight=#Bold# if using names is a concern. :)

Re: [Suggestion] Allow FontWeight "aliases"

Posted: January 2nd, 2018, 2:21 pm
by jsmorley
SilverAzide wrote:OK, no problem... it's easy enough to just do FontWeight=#Bold# if using names is a concern. :)
@IncludeFontWeights=#@#FontWeights.inc

:-)