Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
text_shaper.hpp File Reference
#include <pulp/canvas/canvas.hpp>
#include <pulp/canvas/attributed_string.hpp>
#include <string>
#include <string_view>
#include <vector>
#include <unordered_map>
#include <memory>
#include <cstdint>
#include <mutex>

Go to the source code of this file.

Classes

struct  pulp::canvas::ShapedSegment
 A measured text segment — cached after shaping. More...
class  pulp::canvas::PreparedText
 Prepared text — shaped once, can be reflowed at any width. More...
struct  pulp::canvas::ShapedLayout
 Result of laying out prepared text at a specific width. More...
struct  pulp::canvas::ShapedLayout::Line
struct  pulp::canvas::ShapedLayout::Line::Fragment
class  pulp::canvas::TextShaper
 Text shaper — the PreText-style measure-once-reflow-forever engine. More...
struct  pulp::canvas::ParagraphLineExtent
 One shaped paragraph line's own vertical metrics, as SkParagraph's LineMetrics reports them. More...
struct  pulp::canvas::ParagraphTextExtents
 Worst-case vertical extents over every line of a shaped paragraph. More...

Namespaces

namespace  pulp
namespace  pulp::canvas

Enumerations

enum class  pulp::canvas::BreakMode { pulp::canvas::normal , pulp::canvas::break_word , pulp::canvas::anywhere }
 CSS overflow-wrap / word-break break opportunity mode. More...

Functions

ParagraphTextExtents pulp::canvas::paragraph_text_extents (const std::vector< ParagraphLineExtent > &lines, float font_size)
 Takes the max ascent, descent and leading over lines, so a later line whose fallback face is taller than the first still widens the box.
TextShaper & pulp::canvas::global_text_shaper ()
 Global text shaper singleton (uses the best available backend).
std::uint64_t pulp::canvas::text_shaper_prepare_call_count ()
 Monotonic count of TextShaper::prepare() invocations across all shapers.