diff options
author | Mattias Andrée <maandree@kth.se> | 2023-01-08 22:39:00 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-01-08 22:39:00 +0100 |
commit | 68d533e7fdbbd33d720412aaab1848200b6c8863 (patch) | |
tree | e6310d970993ccb4886d6e6a4e2924cce0f14d89 /common.h | |
parent | Fix warnings (diff) | |
download | libfonts-68d533e7fdbbd33d720412aaab1848200b6c8863.tar.gz libfonts-68d533e7fdbbd33d720412aaab1848200b6c8863.tar.bz2 libfonts-68d533e7fdbbd33d720412aaab1848200b6c8863.tar.xz |
m + add tests
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | common.h | 91 |
1 files changed, 91 insertions, 0 deletions
@@ -31,6 +31,97 @@ X(11, "v-coloured-text-aa", vertical_colour_text_antialiasing, LIBFONTS_ANTIALIASING_GREYSCALE, libfonts_parse_aa__) _\ X(12, "d-coloured-text-aa", diagonal_colour_text_antialiasing, LIBFONTS_ANTIALIASING_GREYSCALE, libfonts_parse_aa__) +#define LIST_ANTIALIASINGS(X, _)\ + X(LIBFONTS_ANTIALIASING_UNSPECIFIED, "unspecified") _\ + X(LIBFONTS_ANTIALIASING_NONE, "none") _\ + X(LIBFONTS_ANTIALIASING_NONE, "aliased") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE, "greyscale") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE, "grayscale") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE, "grey") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE, "gray") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE, "antialiased") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE_FORCED, "greyscale!") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE_FORCED, "grayscale!") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE_FORCED, "grey!") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE_FORCED, "gray!") _\ + X(LIBFONTS_ANTIALIASING_GREYSCALE_FORCED, "antialiased!") _\ + X(LIBFONTS_ANTIALIASING_SUBPIXEL, "subpixel") _\ + X(LIBFONTS_ANTIALIASING_SUBPIXEL, "glitter") _\ + X(LIBFONTS_ANTIALIASING_SUBPIXEL_FORCED, "subpixel!") _\ + X(LIBFONTS_ANTIALIASING_SUBPIXEL_FORCED, "glitter!") + +#define LIST_SUBPIXEL_ORDERS(X, _)\ + X(LIBFONTS_SUBPIXEL_ORDER_UNKNOWN, "unknown") _\ + X(LIBFONTS_SUBPIXEL_ORDER_NONRGB, "non-rgb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_NONLINEAR, "non-linear") _\ + X(LIBFONTS_SUBPIXEL_ORDER_OTHER, "other") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RGB, "rgb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_R_G_B, "r:g:b") _\ + X(LIBFONTS_SUBPIXEL_ORDER_R_G_B, "vrgb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BGR, "bgr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_B_G_R, "b:g:r") _\ + X(LIBFONTS_SUBPIXEL_ORDER_B_G_R, "vbgr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GBR, "gbr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_G_B_R, "g:b:r") _\ + X(LIBFONTS_SUBPIXEL_ORDER_G_B_R, "vgbr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RBG, "rbg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_R_B_G, "r:b:g") _\ + X(LIBFONTS_SUBPIXEL_ORDER_R_B_G, "vrbg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BRG, "brg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_B_R_G, "b:r:g") _\ + X(LIBFONTS_SUBPIXEL_ORDER_B_R_G, "vbrg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GRB, "grb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_G_R_B, "g:r:b") _\ + X(LIBFONTS_SUBPIXEL_ORDER_G_R_B, "vgrb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RR_GB, "rr:gb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GR_BR, "gr:br") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BG_RR, "bg:rr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RB_RG, "rb:rg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RR_BG, "rr:bg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BR_GR, "br:gr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GB_RR, "gb:rr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RG_RB, "rg:rb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GG_RB, "gg:rb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RG_BG, "rg:bg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BR_GG, "br:gg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GB_GR, "gb:gr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GG_BR, "gg:br") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BG_RG, "bg:rg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RB_GG, "rb:gg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GR_GB, "gr:gb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BB_RG, "bb:rg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RB_GB, "rb:gb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GR_BB, "gr:bb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BG_BR, "bg:br") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BB_GR, "bb:gr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_GB_RB, "gb:rb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_RG_BB, "rg:bb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BR_BG, "br:bg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_RR_GB, "balanced rr:gb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_GR_BR, "balanced gr:br") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_BG_RR, "balanced bg:rr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_RB_RG, "balanced rb:rg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_RR_BG, "balanced rr:bg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_BR_GR, "balanced br:gr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_GB_RR, "balanced gb:rr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_RG_RB, "balanced rg:rb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_GG_RB, "balanced gg:rb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_RG_BG, "balanced rg:bg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_BR_GG, "balanced br:gg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_GB_GR, "balanced gb:gr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_GG_BR, "balanced gg:br") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_BG_RG, "balanced bg:rg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_RB_GG, "balanced rb:gg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_GR_GB, "balanced gr:gb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_BB_RG, "balanced bb:rg") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_RB_GB, "balanced rb:gb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_GR_BB, "balanced gr:bb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_BG_BR, "balanced bg:br") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_BB_GR, "balanced bb:gr") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_GB_RB, "balanced gb:rb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_RG_BB, "balanced rg:bb") _\ + X(LIBFONTS_SUBPIXEL_ORDER_BALANCED_BR_BG, "balanced br:bg") + static inline void transform(double *x_out, double *y_out, double x, double y, const struct libfonts_transformation *transformation) |