Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redaction character font #100

Merged
merged 4 commits into from
May 24, 2024
Merged

Add redaction character font #100

merged 4 commits into from
May 24, 2024

Conversation

rossjrw
Copy link
Member

@rossjrw rossjrw commented May 23, 2024

None of the fonts in sigma.css provide a FULL BLOCK character, causing it to fall back to browser default. On some systems (Fedora and Android at least), this default character is square, which breaks immersion by making redacted text look like it's about twice as long as it actually is:

4-digit SCP number:
image

This PR addresses this by adding a from-scratch font that provides a FULL BLOCK character with roughly the same dimensions as 0 from Inter. Font is licensed SIL OFL and the copyright is attributed to The SCP Wiki.

I have tweaked the top/bottom borders of the character to better align aesthetically with surrounding text, and the left/right borders extend slightly beyond the character's width to cover subpixel lines that are sometimes visible between adjacent characters.

It's not a variable font, I don't know how to do that. A future improvement could make it act similarly to Inter's variables.

image

Demo on https://scp-sandbox-3.wikidot.com/croquemtest revision 1501

@leo60228
Copy link
Member

Since the font contains only a single codepoint, it'd probably make sense to set unicode-range for efficiency reasons?

@rossjrw rossjrw added the enhancement New feature or request label May 23, 2024
@rossjrw
Copy link
Member Author

rossjrw commented May 23, 2024

@leo60228 TIL, 10/10 suggestion

@Kufat
Copy link
Contributor

Kufat commented May 24, 2024

LGTM but I'm hesitant to officially approve because of my limited CSS experience

Copy link
Member

@emmiegit emmiegit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change. We should also announce this to INT.

@rossjrw rossjrw merged commit 559f440 into main May 24, 2024
2 checks passed
@rossjrw rossjrw deleted the redactrect branch May 24, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants