mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Maptext 2023: I can see clearly now (#76356)
## About The Pull Request We needed to replace our maptext font. Closes https://github.com/tgstation/tgstation/issues/73002 Replaced with a pair of new fonts, made some improvements and fixes while we're at it. - Two new maptext fonts: Grand9K and TinyUnicode - These two scale cleanly with BYOND icon sizes, so no antialiasing of already tiny fonts making it look bad when enlarged on screen - Fixed size fonts now have metrics to be used properly on overlays (such as status display) where a client (a requirement for MeasureText) is not feasible - VCR OSD Mono still here, usable as a variable size font with larger text - Synchronizes status display scrolling speed between lines - Fixed special maptexts for yelling, clown, redtext, greentext https://github.com/tgstation/tgstation/assets/83487515/7dbaf1d1-f1d5-46ff-8903-d95cab059ed8 ## Why It's Good For The Game Maptext looks like crap if you're one of the players who no longer have the old font. Even if you do have Small Fonts, this looks better. ## Changelog 🆑 LT3 refactor: Refactored maptext (those floating words) fix: Fixed special chat bubbles for yelling, clown, redtext, greentext fix: Fixed alignment of status display text code: Status displays now synchronize their message lines when scrolling /🆑
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
/// Approximate height in pixels of an 'average' line, used for height decay
|
||||
#define CHAT_MESSAGE_APPROX_LHEIGHT 11
|
||||
/// Max width of chat message in pixels
|
||||
#define CHAT_MESSAGE_WIDTH 96
|
||||
#define CHAT_MESSAGE_WIDTH 112
|
||||
/// The dimensions of the chat message icons
|
||||
#define CHAT_MESSAGE_ICON_SIZE 9
|
||||
|
||||
@@ -145,6 +145,10 @@
|
||||
if (!ismob(target))
|
||||
extra_classes |= "small"
|
||||
|
||||
// Why are you yelling?
|
||||
if(copytext_char(text, -2) == "!!")
|
||||
extra_classes |= SPAN_YELL
|
||||
|
||||
var/list/prefixes
|
||||
|
||||
// Append radio icon if from a virtual speaker
|
||||
@@ -171,7 +175,7 @@
|
||||
var/tgt_color = extra_classes.Find("italics") ? target.chat_color_darkened : target.chat_color
|
||||
|
||||
// Approximate text height
|
||||
var/complete_text = "<span class='center [extra_classes.Join(" ")]' style='color: [tgt_color]'>[owner.say_emphasis(text)]</span>"
|
||||
var/complete_text = "<span style='color: [tgt_color]'><span class='center [extra_classes.Join(" ")]'>[owner.say_emphasis(text)]</span></span>"
|
||||
|
||||
var/mheight
|
||||
WXH_TO_HEIGHT(owned_by.MeasureText(complete_text, null, CHAT_MESSAGE_WIDTH), mheight)
|
||||
|
||||
Reference in New Issue
Block a user