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

Fix Github Font Preview mini glyph fill color #14

Merged
merged 1 commit into from
Dec 27, 2016

Conversation

emabrey
Copy link
Collaborator

@emabrey emabrey commented Dec 27, 2016

The font preview userscript was previously drawing the glyphs within the preview pages without specifying the fill color as was done when drawing the large glyph. This worked fine when the default fill color was the
standard black, but when the color was very light, like it is in dark themes such as Github Dark, this resulted in having nearly-white glyphs drawn on top of a nearly-white background. The readability problem this
caused has been fixed by drawing all the glyphs, both the small preview glyphs and the large detail glyph, using a specific color. That color is controlled by the glyphFillColor variable, which is simply a rename of
the bigGlyphFillColor variable but still using the same default color.

Before/after UI fix (Github Dark style):
Shows bugged glyphs on the left with fixed glyphs on the right

The font preview userscript was previously drawing the glyphs within the
preview pages without specifying the fill color as was done when drawing
the large glyph. This worked fine when the default fill color was the
standard black, but when the color was very light, like it is in dark
themes such as Github Dark, this resulted in having nearly-white glyphs
drawn on top of a nearly-white background. The readability problem this
caused has been fixed by drawing all the glyphs, both the small preview
glyphs and the large detail glyph, using a specific color. That color is
controlled by the "glyphFillColor" variable, which is simply a rename of
the "bigGlyphFillColor" variable but still using the same default color.

You can see a before/after of the UI changes involved in the fix here:
https://imgur.com/1K7Tb7j

Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
@Mottie
Copy link
Owner

Mottie commented Dec 27, 2016

Hi @emabrey!

Thanks for the contribution! I don't see the same issue shown in the screen shot, but I don't have any issues with the PR. It is odd though since I specifically made this userscript compatible with GitHub-Dark.

@Mottie Mottie merged commit 18fb7f9 into Mottie:master Dec 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants