From fc7f69ad04dbc044be5820fe1133f9bcc1d83574 Mon Sep 17 00:00:00 2001 From: Cody Brittain Date: Fri, 1 Sep 2023 14:01:55 -0400 Subject: [PATCH] Font size macros now produce correctly sized text (#17205) * Font sizes are actually what they say they are (Small is small now) * CL * Fix compile --- code/__defines/_macros.dm | 22 ++++++----- html/changelogs/GeneralCamo - Font Fixes.yml | 41 ++++++++++++++++++++ 2 files changed, 53 insertions(+), 10 deletions(-) create mode 100644 html/changelogs/GeneralCamo - Font Fixes.yml diff --git a/code/__defines/_macros.dm b/code/__defines/_macros.dm index df8c471e300..4e69dac1985 100644 --- a/code/__defines/_macros.dm +++ b/code/__defines/_macros.dm @@ -22,19 +22,21 @@ #define SPAN_SOGHUN(X) ("" + X + "") #define SPAN_VOTE(X) ("" + X + "") +#define SPAN_SIZE(size, text) ("" + text + "") + #define SPAN_HIGHDANGER(X) (FONT_LARGE(SPAN_DANGER(X))) -#define FONT_SIZE_SMALL 1 -#define FONT_SIZE_NORMAL 2 -#define FONT_SIZE_LARGE 3 -#define FONT_SIZE_HUGE 4 -#define FONT_SIZE_GIANT 5 +#define FONT_SIZE_SMALL "10px" +#define FONT_SIZE_NORMAL "13px" +#define FONT_SIZE_LARGE "16px" +#define FONT_SIZE_HUGE "18px" +#define FONT_SIZE_GIANT "24px" -#define FONT_SMALL(X) ("" + X + "") -#define FONT_NORMAL(X) ("" + X + "") -#define FONT_LARGE(X) ("" + X + "") -#define FONT_HUGE(X) ("" + X + "") -#define FONT_GIANT(X) ("" + X + "") +#define FONT_SMALL(X) SPAN_SIZE(FONT_SIZE_SMALL, X) +#define FONT_NORMAL(X) SPAN_SIZE(FONT_SIZE_NORMAL, X) +#define FONT_LARGE(X) SPAN_SIZE(FONT_SIZE_LARGE, X) +#define FONT_HUGE(X) SPAN_SIZE(FONT_SIZE_HUGE, X) +#define FONT_GIANT(X) SPAN_SIZE(FONT_SIZE_GIANT, X) #define MATRIX_DANGER(X) (FONT_LARGE(SPAN_DANGER(X))) #define MATRIX_NOTICE(X) (FONT_LARGE(SPAN_NOTICE(X))) diff --git a/html/changelogs/GeneralCamo - Font Fixes.yml b/html/changelogs/GeneralCamo - Font Fixes.yml new file mode 100644 index 00000000000..1b811fc3a96 --- /dev/null +++ b/html/changelogs/GeneralCamo - Font Fixes.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: GeneralCamo + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Font size macros accurately describe what the result will be."