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:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user