1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Rename AlphaFromCoverage to FontColorTransferFunction (#8201)

`ab_glyph` would output coverage values, but `vello` outputs RGBA. So
the old name was a misnomer.

I also suspect our default values are wrong, but I need to investigate
that more properly in a separate PR.
This commit is contained in:
Emil Ernerfeldt
2026-05-26 10:51:39 +02:00
committed by GitHub
parent 71f22ff1a5
commit fc1b2a99fd
6 changed files with 113 additions and 58 deletions

View File

@@ -25,8 +25,8 @@ pub struct TextOptions {
/// Maximum size of the font texture.
pub max_texture_side: usize,
/// Controls how to convert glyph coverage to alpha.
pub alpha_from_coverage: crate::AlphaFromCoverage,
/// Controls how to convert glyph colors when writing to the font atlas.
pub color_transfer_function: crate::FontColorTransferFunction,
/// Whether to enable font hinting
///
@@ -54,7 +54,7 @@ impl Default for TextOptions {
fn default() -> Self {
Self {
max_texture_side: 2048, // Small but portable
alpha_from_coverage: crate::AlphaFromCoverage::default(),
color_transfer_function: crate::FontColorTransferFunction::default(),
font_hinting: true,
subpixel_binning: true,
}