From: Ben Harris Date: Wed, 10 Jul 2024 13:47:07 +0000 (+0100) Subject: Condense weight and width tables X-Git-Tag: bedstead-002.007~20 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=e6128359b5a26184dfe26660970a724294a5cec0;p=bedstead-debian.git Condense weight and width tables They're really very small and putting each weight and width on a single line makes them much more readable. --- diff --git a/bedstead.c b/bedstead.c index 350fcfe..1a59bb8 100644 --- a/bedstead.c +++ b/bedstead.c @@ -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]);