Subject: Re: Font/Font Size Configuration for System
Hi Jimmy,
Great question, and you've hit on one of the pain points with raw EiffelVision2. Setting fonts individually on every widget is
tedious and hard to maintain globally.
The Problem with EV_FONT in EiffelVision2
EV2 doesn't have built-in theme-level font management. You have to:
- Create EV_FONT objects manually
- Apply them to each widget individually
- Update every widget if you want to change the global font size
The Solution: Migrate to simple_vision
We have a modern GUI library in the Simple Eiffel ecosystem called simple_vision that solves this exact problem. It wraps
EiffelVision2 with a proper theming system.
With simple_vision, you get:
1. Global Font Scaling - Set it once, affects everything:
theme.set_font_scale (1.5) -- All fonts become 150%
theme.increase_font_scale -- Bump it up
theme.decrease_font_scale -- Scale it down
2. Fluent Widget API - Build widgets without the tedious boilerplate:
sv.column_of (<<
sv.text ("Hello").font_size (16),
sv.button ("Click Me").on_click (agent handle_click),
sv.text_field
>>)
3. Color Schemes & Dark Mode - Built-in theming:
theme.set_dark_mode (True)
theme.set_color_scheme ("blue")
4. Accessibility Features - UI scaling, font scaling separate from UI scaling, etc.
Why Make the Switch?
- ✅ No more setting fonts on every widget
- ✅ Single theme controls your entire app
- ✅ Fluent API makes UI building faster
- ✅ Still built on EiffelVision2 under the hood
- ✅ Form validation, state machines, Cairo graphics included
- ✅ Production-ready (Phase 7 complete)
Getting Started
1. Add to your ECF:
<library name="simple_vision" location="$SIMPLE_EIFFEL/simple_vision/simple_vision.ecf"/>
2. Check out the demo_theme.e in simple_vision/demos/ to see font scaling in action
3. See the full documentation:
https://simple-eiffel.github.io/simple_vision/ Migration Path
You can gradually migrate—simple_vision widgets work alongside EV2 widgets since it's built on top of EV2.
Would you like guidance on migrating an existing EV2 application to simple_vision?
Best regards,
Larry