mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 14:51:15 +00:00
A few more font docs
This commit is contained in:
parent
af8df5cfbe
commit
5e37fa027b
1 changed files with 11 additions and 0 deletions
|
@ -9,6 +9,17 @@
|
||||||
LICENSE END */
|
LICENSE END */
|
||||||
/*!
|
/*!
|
||||||
Font abstraction for the run-time library.
|
Font abstraction for the run-time library.
|
||||||
|
|
||||||
|
The module receives FontRequest objects and returns Rc<Font>, which represents a font provided by
|
||||||
|
the underlying platform that matches the specified font request as closely as possible.
|
||||||
|
|
||||||
|
Internally a FontRequest is resolved to a Rc<PlatformFont> and a list of Rc<Font> instances, one for
|
||||||
|
each pixel size. The Rc<Font> is basically an Rc<PlatformFont> and the pixel size specific, cached glyph
|
||||||
|
metrics -- base on the assumption that the platform provides scalable fonts.
|
||||||
|
|
||||||
|
On the graphics side, the generated rasterized glyphs may be cached in textures. That cache is indexed by the
|
||||||
|
Rc<PlatformFont> since the underlying platform may map different font requests to the same physical PlatformFont
|
||||||
|
(typically backed by a .ttf file or ttf inside a .ttc)
|
||||||
*/
|
*/
|
||||||
use crate::string::SharedString;
|
use crate::string::SharedString;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue