chiark / gitweb /
Condense weight and width tables
authorBen Harris <bjh21@bjh21.me.uk>
Wed, 10 Jul 2024 13:47:07 +0000 (14:47 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Wed, 10 Jul 2024 13:58:15 +0000 (14:58 +0100)
They're really very small and putting each weight and width on a
single line makes them much more readable.

bedstead.c

index 350fcfe503b173d075b20808347fe13966b4b157..1a59bb85ef67012aefd96c9cb75a5a62ce2d4d57 100644 (file)
@@ -141,42 +141,12 @@ static struct width {
        double xpix;
        int ttfwidth;
 } const widths[] = {
-       {
-               "--normal",
-               "",
-               100,            /* xpix */
-               5,              /* ttfwidth */
-       },
-       {
-               "--ultra-condensed",
-               " Ultra Condensed",
-               50,             /* xpix */
-               1,              /* ttfwidth */
-       },
-       {
-               "--extra-condensed",
-               " Extra Condensed",
-               62.5,           /* xpix */
-               2,              /* ttfwidth */
-       },
-       {
-               "--condensed",
-               " Condensed",
-               75,             /* xpix */
-               3,              /* ttfwidth */
-       },
-       {
-               "--semi-condensed",
-               " Semi Condensed",
-               87.5,           /* xpix */
-               4,              /* ttfwidth */
-       },
-       {
-               "--extended",
-               " Extended",
-               125,            /* xpix */
-               7,              /* ttfwidth */
-       },
+       { "--normal",          "",                 100.0, 5 },
+       { "--ultra-condensed", " Ultra Condensed",  50.0, 1 },
+       { "--extra-condensed", " Extra Condensed",  62.5, 2 },
+       { "--condensed",       " Condensed",        75.0, 3 },
+       { "--semi-condensed",  " Semi Condensed",   87.5, 4 },
+       { "--extended",        " Extended",        125.0, 7 },
 };
 static int const nwidths = sizeof(widths) / sizeof(widths[0]);
 
@@ -204,24 +174,9 @@ static struct weight {
        int weight; /* Expressed in internal units */
        int ttfweight;
 } const weights[] = {
-       {
-               "--medium",
-               "",
-               0,
-               500,
-       },
-       {
-               "--light",
-               " Light",
-               2 * XQTR_S - 100,
-               300,
-       },
-       {
-               "--bold",
-               " Bold",
-               +50,
-               700,
-       },
+       { "--medium", "",                      0, 500 },
+       { "--light",  " Light", 2 * XQTR_S - 100, 300 },
+       { "--bold",   " Bold",               +50, 700 },
 };
 
 static int const nweights = sizeof(weights) / sizeof(weights[0]);