Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOnly respect the text color's alpha component for Bitmap glyphs. #1905
Conversation
|
r? @glennw |
|
In the context of AppleColorEmoji, this change seem reasonable and correct. However a big part of #1816 was refactoring how bitmap fonts actually work. Was that all just for that one font? Are there other fonts that this mode now applies to and wouldn't be correct? |
| FontRenderMode::Subpixel | | ||
| FontRenderMode::Alpha | | ||
| FontRenderMode::Mono => *color, | ||
| }; |
This comment has been minimized.
This comment has been minimized.
Gankra
Oct 22, 2017
Contributor
As a minor style point, this could just be a ternary:
let color = if font.render_mode == FontRenderMode::Bitmap { ... } else { ... };
I don't expect this should need to be updated for other font modes.
|
I don't know the answers to these questions. I'm hoping Glenn does :) |
|
I can add a new |
|
@mstange How about instead we have something like (with better naming perhaps):
This allows us to specify how to treat the color for a bitmap font, without needing a new font render mode. |
|
@lsalzman had some concerns about this change. He is going to come up with a better fix. |
mstange commentedOct 22, 2017
•
edited by larsbergstrom
Fixes #1780.
Fixes #1876.
This restores a chunk of code that was added in #1754 and removed in #1816, with the difference that I use
color.aas the alpha component instead of1.0.This change is