mirror of
https://libwebsockets.org/repo/libwebsockets
synced 2024-11-22 00:57:52 +00:00
e3dca87f23
This adds optional display list support to lws_display, using DLOs (Display List Objects). DLOs for rectangle / rounded rectangle (with circle as the degenerate case), PNGs, JPEG and compressed, antialiased bitmapped fonts and text primitives are provided. Logical DLOs are instantiated on heap and listed into an lws_display_list owner, DLOs handle attributes like position, bounding box, colour + opacity, and local error diffusion backing buffer. When the display list is complete, it can be rasterized a line at a time, with scoped error diffusion resolved, such that no allocation for the framebuffer is required at any point. DLOs are freed as the rasterization moves beyond their bounding box. Adds a platform registry binding names and other metadata to lws_display fonts / PNGs / JPEGs. Provides registration, destruction and best match selection apis.
21 lines
672 B
C++
21 lines
672 B
C++
// Utility functions for processing imported font files.
|
|
|
|
#pragma once
|
|
#include "datafile.hh"
|
|
|
|
namespace mcufont {
|
|
|
|
// Find and eliminate any duplicate glyphs by appending their char vectors.
|
|
void eliminate_duplicates(std::vector<DataFile::glyphentry_t> &glyphtable);
|
|
|
|
// Calculate the maximum bounding box of the glyphs and crop them to that.
|
|
// Adjust fontinfo accordingly.
|
|
void crop_glyphs(std::vector<DataFile::glyphentry_t> &glyphtable,
|
|
DataFile::fontinfo_t &fontinfo);
|
|
|
|
// Fill in the flags (BW, monospace) automatically.
|
|
void detect_flags(const std::vector<DataFile::glyphentry_t> &glyphtable,
|
|
DataFile::fontinfo_t &fontinfo);
|
|
|
|
}
|