You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Start with the default fonts (we will be adding to them rather than replacing them).
However, the function's behavior seems to completely replace the existing font configuration, as it uses ctx.set_fonts and the function name suggests a replacement (replace_fonts). This seems inconsistent with the comment.
Questions
Is the comment in the replace_fonts function correct?
Additional Context
This issue was noticed after reviewing PR #5228, which introduced the ctx.add_font API and clarified the behavior of ctx.set_fonts with the comment:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
In the examples/custom_font/src/main.rs, the
replace_fonts
function has the following comment:egui/examples/custom_font/src/main.rs
Line 44 in 3ffe1ed
However, the function's behavior seems to completely replace the existing font configuration, as it uses ctx.set_fonts and the function name suggests a replacement (replace_fonts). This seems inconsistent with the comment.
Questions
Is the comment in the replace_fonts function correct?
Additional Context
This issue was noticed after reviewing PR #5228, which introduced the ctx.add_font API and clarified the behavior of ctx.set_fonts with the comment:
egui/crates/egui/src/context.rs
Line 1759 in 3ffe1ed
This discussion was translated by AI.
Beta Was this translation helpful? Give feedback.
All reactions