Expand description
Functions to manage adding fonts + images, garbage collection
Structs§
- AddFont
- AddFont
Instance - AddImage
- AddImage
Msg - AppResources
- Stores the resources for the application, souch as fonts, images and cached texts, also clipboard strings
- Au
- Cluster
Info - Info about what cluster a certain glyph belongs to.
- Cluster
Iterator - Iterator over glyphs that returns information about the cluster that this glyph belongs to.
Returned by the
ScaledWord::cluster_iter()
function. - Delete
Image Msg - Epoch
- External
Image Data - Descriptor for external image resources. See
ImageData
. - External
Image Id - An arbitrary identifier for an external image provided by the application. It must be a unique identifier for each external image.
- Fake
Render Api - Used only for debugging, so that the AppResource garbage collection tests can run without a real RenderApi
- FontId
- Font
Instance Key - Font
Instance Options - Font
Instance Platform Options - FontKey
- Font
Metrics - Font
Variation - Glyph
Info - Glyph
Options - Glyph
Position - IdNamespace
- Image
Descriptor - Metadata (but not storage) describing an image In WebRender.
- Image
Descriptor Flags - Various flags that are part of an image descriptor.
- ImageId
- Image
Info - Image
Key - Layouted
Glyphs - Returns the layouted glyph instances
- Load
Font Fn - Load
Image Fn - Loaded
Font - Loaded
Font Source - Loaded
Image Source - Primitive
Flags - RawImage
- Raw image made up of raw pixels (either BRGA8 or A8)
- Scaled
Word - Word that is scaled (to a font / font instance), but not yet positioned
- Scaled
Words - A paragraph of words that are shaped and scaled (* but not yet layouted / positioned*!) according to their final size in pixels.
- Synthetic
Italics - Text
Cache - Cache for accessing large amounts of text
- TextId
- Update
Image - Word
- Section of a certain type
- Word
Positions - Stores the positions of the vertically laid out texts
- Words
- Text broken up into
Tab
,Word()
,Return
characters
Enums§
- AddFont
Msg - Delete
Font Msg - External
Image Type - Storage format identifier for externally-managed images.
- Font
Hinting - FontLCD
Filter - Font
Render Mode - Font
Source - Image
Data - Represents the backing store of an arbitrary series of pixels for display by WebRender. This storage can take several forms.
- Image
Dirty Rect - Image
Source - Immediate
Font Id - RawImage
Format - Resource
Update - Texture
Target - Specifies the type of texture target in driver terms.
- Word
Type - Either a white-space delimited word, tab or return character
Constants§
- AU_
PER_ PX - FONT_
INSTANCE_ FLAG_ EMBEDDED_ BITMAPS - FONT_
INSTANCE_ FLAG_ FLIP_ X - FONT_
INSTANCE_ FLAG_ FLIP_ Y - FONT_
INSTANCE_ FLAG_ FONT_ SMOOTHING - FONT_
INSTANCE_ FLAG_ FORCE_ AUTOHINT - FONT_
INSTANCE_ FLAG_ FORCE_ GDI - FONT_
INSTANCE_ FLAG_ LCD_ VERTICAL - FONT_
INSTANCE_ FLAG_ NO_ AUTOHINT - FONT_
INSTANCE_ FLAG_ SUBPIXEL_ BGR - FONT_
INSTANCE_ FLAG_ SUBPIXEL_ POSITION - FONT_
INSTANCE_ FLAG_ SYNTHETIC_ BOLD - FONT_
INSTANCE_ FLAG_ TRANSPOSE - FONT_
INSTANCE_ FLAG_ VERTICAL_ LAYOUT - MAX_AU
- MIN_AU
Traits§
Functions§
- add_
fonts_ and_ images - Scans the DisplayList for new images and fonts. After this call, the RenderApi is guaranteed to know about all FontKeys and FontInstanceKey
- add_
resources - Submits the
AddFont
,AddFontInstance
andAddImage
resources to the RenderApi. Extendscurrently_registered_images
andcurrently_registered_fonts
by thelast_frame_image_keys
andlast_frame_font_keys
, so that we don’t lose track of what font and image keys are currently in the API. - build_
add_ font_ resource_ updates - Given the fonts of the current frame, returns
AddFont
andAddFontInstance
s of which fonts / instances are currently not in thecurrent_registered_fonts
and need to be added. - build_
add_ image_ resource_ updates - Given the images of the current frame, returns
AddImage
s of which image keys are currently not in thecurrent_registered_fonts
and need to be added. Modifieslast_frame_image_keys
to contain the added image keys - build_
delete_ font_ resource_ updates - build_
delete_ image_ resource_ updates - At the end of the frame, all images that are registered, but weren’t used in the last frame
- delete_
resources - font_
size_ to_ au - garbage_
collect_ fonts_ and_ images - To be called at the end of a frame (after the UI has rendered):
Deletes all FontKeys and FontImageKeys that weren’t used in
the last frame, to save on memory. If the font needs to be recreated, it
needs to be reloaded from the
FontSource
. - get_
font_ id - get_
font_ size - is_
image_ opaque - premultiply
- scan_
ui_ description_ for_ font_ keys - Scans the display list for all font IDs + their font size
- scan_
ui_ description_ for_ image_ keys - Scans the display list for all image keys
Type Aliases§
- CssFont
Id - CssImage
Id - Font
Instance Flags - Glyph
Index - Index
OfLine Break - Line
Breaks - Line
Length - Remaining
Space ToRight - Tile
Size - Word
Index