daegun

C constants

215 constants, extracted from the source at build time so this list cannot drift from it.

Color

Fonts that carry their own color: COLR layer graphs, CPAL palettes and bitmap strikes. A color glyph renders to RGBA pixels rather than to single-channel coverage.

DAEGUN_DRAWN_BATCH_FULL
6

The GPU batch cannot take more geometry.

Upload and clear the batch, then retry the glyph.

DAEGUN_DRAWN_CPU
1

The glyph was rasterized on the CPU and a bitmap is available.

DAEGUN_DRAWN_GPU
2

The glyph was added to the GPU batch and a slot is available to instance.

DAEGUN_DRAWN_GPU_COLOR
3

A color glyph was added to the GPU batch as one slot per layer.

DAEGUN_DRAWN_NOTHING
0

The glyph had no ink, so nothing was drawn.

Normal for a space. Not a failure – daegun_drawn_is_ok still reports true.

DAEGUN_DRAWN_REFERENCE
5

The glyph was rasterized by the reference CPU rasterizer.

DAEGUN_DRAWN_REFUSED
7

The request could not be served, with a reason attached.

A glyph too complex for the GPU path, or one whose size exceeds what the target allows.

DAEGUN_DRAWN_SCENE
4

A color glyph was rendered to finished RGBA pixels.

DAEGUN_PAINT_COLR_GLYPH
2

Draws another color glyph in place, letting one composed glyph reuse another.

How a font builds a flag from a shared base rather than redrawing it each time.

DAEGUN_PAINT_COMPOSITE
13

Combines two children with a blend mode.

The only kind with two children: the source first, the backdrop second. Everything else holds one child or none.

DAEGUN_PAINT_GLYPH
1

Clips its child to the outline of a glyph.

The shape comes from the glyph; the color comes from whatever the child paints.

DAEGUN_PAINT_LAYERS
0

A stack of child paints, drawn back to front.

Its children are the layers, in painting order. Like every node it names them through child_start and child_count, so walking a graph needs no knowledge of which kind you are looking at.

DAEGUN_PAINT_LINEAR_GRADIENT
4

A gradient along a line.

numbers[0..6) is x0, y0, x1, y1, x2, y2: the start, the end, and the rotation point.

DAEGUN_PAINT_RADIAL_GRADIENT
5

A gradient between two circles.

numbers[0..6) is x0, y0, r0, x1, y1, r1 – the inner circle and the outer one. Equal centers give the familiar concentric gradient; offset centers give a cone.

DAEGUN_PAINT_ROTATE
11

Rotates its child.

numbers[0..1) is the angle, and numbers[4..6) is the center when has_center is set.

DAEGUN_PAINT_SCALE
9

Scales its child on each axis independently.

numbers[0..2) is sx, sy, and numbers[4..6) is the center when has_center is set.

DAEGUN_PAINT_SCALE_UNIFORM
10

Scales its child equally on both axes.

numbers[0..1) is the factor, and numbers[4..6) is the center when has_center is set.

DAEGUN_PAINT_SKEW
12

Skews its child on each axis.

numbers[0..2) is x_angle, y_angle, and numbers[4..6) is the center when has_center is set.

DAEGUN_PAINT_SOLID
3

A single flat color, taken from the palette or from your text color.

DAEGUN_PAINT_SWEEP_GRADIENT
6

A gradient swept around a center point.

numbers[0..4) is cx, cy, start_angle, end_angle.

DAEGUN_PAINT_TRANSFORM
7

Applies an arbitrary affine transform to its child.

numbers[0..6) is the matrix.

DAEGUN_PAINT_TRANSLATE
8

Moves its child.

numbers[0..2) is dx, dy.

DAEGUN_PREFER_AUTO
0

Let the router decide per glyph whether the CPU or the GPU is the better path.

DAEGUN_PREFER_CPU
1

Always rasterize on the CPU.

DAEGUN_PREFER_GPU
2

Prefer the GPU wherever the request can be served there.

DAEGUN_PREFER_REFERENCE
3

Use the reference CPU rasterizer, bypassing the fast paths.

For testing and for comparing output, not for production rendering.

Glyphs

Going from characters to glyph ids, and asking about one glyph. A glyph id indexes this font and means something different in any other.

DAEGUN_GLYPH_CLASS_BASE
0

An ordinary glyph that advances the pen and can carry marks.

DAEGUN_GLYPH_CLASS_COMPONENT
3

A piece of a composite glyph, not meant to be drawn on its own.

DAEGUN_GLYPH_CLASS_LIGATURE
1

A glyph standing for several characters at once.

Cursor positions within it come from daegun_font_ligature_carets.

DAEGUN_GLYPH_CLASS_MARK
2

A combining mark, which attaches to a base and takes no advance of its own.

Adding a mark's advance into a pen position is a common way to get accented text wrong.

Hinting

Grid fitting, which nudges outlines onto pixel boundaries so stems stay crisp at small sizes.

DAEGUN_FLAG_ON_CURVE
0x01

The point lies on the curve rather than being a control point.

TrueType stores quadratic outlines as a mixed run of on- and off-curve points, with an implied on-curve point midway between consecutive off-curve ones. This is the flag that tells them apart.

Layout

Breaking and positioning a whole paragraph, plus the Unicode segmentation the process needs. Sizes in and out are on the 1000-unit em.

DAEGUN_ALIGN_CENTER
2

Lines are centered within the measure.

DAEGUN_ALIGN_END
1

Lines align to the end of the measure, following the paragraph direction.

DAEGUN_ALIGN_JUSTIFY
3

Lines are stretched to fill the measure, except the last line of a paragraph.

Uses the font's own justification where it offers any, and spacing otherwise.

DAEGUN_ALIGN_START
0

Lines align to the start of the measure, which follows the paragraph direction.

Left in English, right in Arabic – which is why it is not called "left".

DAEGUN_BREAK_GREEDY
0

Break at the last opportunity that fits on each line.

Fast, and what most software does. Leaves the right edge more ragged than it needs to be.

DAEGUN_BREAK_OPTIMAL
1

Search the paragraph for the set of breaks with the least total raggedness.

Costs more than greedy and looks markedly better, especially in narrow measures where one bad early break spoils several lines.

DAEGUN_ORIENTATION_MIXED
0

In vertical text, upright glyphs stay upright and horizontal scripts are rotated.

What Japanese vertical text normally wants: Han upright, embedded Latin turned on its side.

DAEGUN_ORIENTATION_SIDEWAYS
2

Every glyph is rotated in vertical text, including those that would normally stay upright.

DAEGUN_ORIENTATION_UPRIGHT
1

Every glyph stays upright in vertical text, including Latin.

DAEGUN_WRITING_HORIZONTAL
0

Text runs horizontally, lines advancing downward.

DAEGUN_WRITING_VERTICAL_LR
2

Text runs top to bottom with successive lines advancing to the right.

DAEGUN_WRITING_VERTICAL_RL
1

Text runs top to bottom with successive lines advancing to the left.

The traditional setting for Japanese and Chinese.

Library

Version and error reporting. Check daegun_abi_version against the header you compiled against before anything else, and read daegun_last_error after a call that failed.

DAEGUN_ABI_VERSION
((1u

The ABI version this header describes, as a packed integer.

Compare it against daegun_abi_version() at startup. A mismatch means the header and the library disagree, which is a mistake worth catching immediately rather than debugging as strange behavior later.

if (daegun_abi_version() != DAEGUN_ABI_VERSION) {
    fprintf(stderr, "daegun header and library disagree\n");
    return 1;
}

Options

Filling an options struct with its defaults. Always call the _default function rather than zeroing the struct yourself: zero is a meaningful value for several fields, and the defaults are not all zero.

DAEGUN_CAP_BUTT
0

A stroke ends exactly at its endpoint, squared off.

DAEGUN_CAP_ROUND
1

A stroke ends in a semicircle centered on its endpoint, extending half the width past it.

DAEGUN_CAP_SQUARE
2

A stroke ends in a square extending half the width past its endpoint.

DAEGUN_HINT_AUTO
3

Use daegun's own autohinter rather than the font's instructions.

The better answer for a face with weak or missing hints, which is most of them.

DAEGUN_HINT_AUTO_FORCE
4

Use the autohinter even when the font ships instructions of its own.

For consistency across a mixed set of fonts, at the cost of ignoring what a font asked for.

DAEGUN_HINT_CLASSIC
2

Run the font's own hinting instructions, fitting both axes to the grid.

The crispest result at small sizes and the least faithful to the design, since horizontal fitting quantizes spacing.

DAEGUN_HINT_NONE
0

Do not hint. The outline is scaled and rasterized as drawn.

The right choice for large text and for GPU rendering, where grid fitting buys nothing and costs fidelity to the design.

DAEGUN_HINT_SUBPIXEL
1

Hint for subpixel positioning: fit vertically, leave horizontal placement free.

Keeps stems crisp across the baseline while letting glyphs sit at fractional horizontal positions, which preserves spacing. The usual choice for on-screen text at reading sizes.

DAEGUN_JOIN_BEVEL
2

Stroke joins are cut off flat across the corner.

DAEGUN_JOIN_MITER
0

Stroke joins come to a sharp point.

A very shallow angle produces a very long spike, which is why the other joins exist.

DAEGUN_JOIN_ROUND
1

Stroke joins are rounded off with an arc.

DAEGUN_LAYOUT_BGR_H
2

Horizontal stripes in blue, green, red order.

DAEGUN_LAYOUT_BGR_H_UNFILTERED
6

Horizontal BGR stripes with no filtering applied.

DAEGUN_LAYOUT_BGR_V
4

Vertical stripes in blue, green, red order.

DAEGUN_LAYOUT_BGR_V_UNFILTERED
8

Vertical BGR stripes with no filtering applied.

DAEGUN_LAYOUT_GRAYSCALE
0

Where the display puts its color samples. Anything unrecognized is grayscale, so a caller on a newer header than the library gets plain antialiasing rather than a failed render.

DAEGUN_LAYOUT_RGB_H
1

Horizontal stripes in red, green, blue order – the most common desktop LCD.

DAEGUN_LAYOUT_RGB_H_UNFILTERED
5

Horizontal RGB stripes with no filtering applied.

The filtered variants spread each subpixel's coverage into its neighbors to suppress color fringing. Unfiltered is sharper and fringes more; take it only if you filter yourself.

DAEGUN_LAYOUT_RGB_V
3

Vertical stripes in red, green, blue order, as on a rotated display.

DAEGUN_LAYOUT_RGB_V_UNFILTERED
7

Vertical RGB stripes with no filtering applied.

Paths and stroking

Building a path by hand and stroking it. daegun_path * is an owned handle: create it, add verbs, use it, free it.

DAEGUN_FILL_EVENODD
1

Fill where a ray crosses the outline an odd number of times.

Overlapping contours cancel rather than reinforcing, so a shape drawn twice becomes a hole. Fonts use the non-zero rule; even-odd is here for paths of your own.

DAEGUN_FILL_NONZERO
0

Fill where the winding number is not zero, counting the direction each contour is drawn in.

The rule fonts use. Overlapping contours drawn the same way reinforce rather than cancel, so a stem crossing a bowl stays solid. Contours wound the opposite way cut holes, which is how a counter in an "o" is made.

DAEGUN_VERB_CLOSE
4

Closes the current contour back to its starting point.

DAEGUN_VERB_CUBIC
3

A cubic curve through two control points – what CFF outlines are made of.

DAEGUN_VERB_LINE
1

A straight segment to one point.

DAEGUN_VERB_MOVE
0

What each verb takes from the point array, in order.

DAEGUN_VERB_QUAD
2

A quadratic curve through one control point – what TrueType outlines are made of.

Reading a table by hand

Bounds-checked big-endian readers and writers. OpenType stores everything big-endian, and these do the byte order and the range check together, so a truncated table produces a refusal rather than a read past the end.

DAEGUN_AAT_CLASS_DELETED_GLYPH
2

The class an Apple state machine assigns to a glyph it has removed.

DAEGUN_AAT_CLASS_END_OF_TEXT
0

The classes and state every morx machine starts from.

DAEGUN_AAT_STATE_START_OF_TEXT
0

The initial state of an Apple state machine table.

AAT shaping runs a finite state machine over the glyph stream; this is where it begins.

Shaping

Turning a string into positioned glyphs using the font's own rules. The resulting daegun_run * holds glyphs, advances and offsets in parallel arrays of the same length, borrowed from the run until it is freed.

DAEGUN_CLUSTER_CHARACTERS
2

Character-level clusters with no monotonicity guarantee.

Cluster values may decrease across a reordering, so they cannot be binary searched.

DAEGUN_CLUSTER_GRAPHEMES
3

Grapheme-level clusters with no monotonicity guarantee.

DAEGUN_CLUSTER_MONOTONE_CHARACTERS
1

Cluster values never decrease, and boundaries fall on character rather than grapheme boundaries.

Finer than graphemes, so a combining sequence may be split across clusters.

DAEGUN_CLUSTER_MONOTONE_GRAPHEMES
0

Cluster values never decrease, and cluster boundaries fall on grapheme boundaries.

The default and the safest choice: monotone clusters can be searched, and grapheme boundaries are where a cursor should be able to sit.

DAEGUN_IGNORABLES_HIDE
0

Default-ignorable characters are shaped but drawn as nothing.

Zero-width joiners, bidi controls and the like keep their place in the cluster mapping – so indices still line up with the source – while producing no ink.

DAEGUN_IGNORABLES_PRESERVE
2

Default-ignorable characters are kept and drawn with whatever glyph the font maps them to.

For inspecting a font's behavior rather than for rendering text.

DAEGUN_IGNORABLES_REMOVE
1

Default-ignorable characters are removed from the output entirely.

Fewer glyphs, but the mapping back to source characters no longer covers them.

Status

DAEGUN_ABSENT
-4

The font does not carry what was asked for.

Not an error in most cases – a font with no MATH table, no vertical metrics or no glyph names is perfectly valid. Treat it as "no answer" and fall back.

DAEGUN_NULL
-1

A required pointer was NULL. Nothing was dereferenced and nothing was written.

daegun checks every pointer it is given before touching it, so passing NULL is always safe and always produces this rather than a crash.

DAEGUN_OK
0

The call succeeded and the out parameter has been written.

The only non-negative status. Every other code is negative, so status != DAEGUN_OK and status < 0 mean the same thing – test whichever reads better.

DAEGUN_PARSE
-2

The data could not be parsed – it is not a font, or it is damaged beyond use.

Expected for input you do not control. Read daegun_last_error for a description, reject the file, and carry on: the library is designed to refuse bad input rather than to be broken by it.

DAEGUN_RANGE
-3

An index or value was outside the range the call accepts.

A glyph id past the end of the font, an index past the end of a list, an enum value that is not one of the defined ones. A bug in the caller rather than in the data.

DAEGUN_UNSUPPORTED
-5

The operation is not available in this build or on this machine.

What a GPU backend answers when its platform is not present – Vulkan on a machine with no driver, Direct3D anywhere but Windows. The library still loads and every other call still works, so this is a runtime capability answer rather than a link failure.

Subsetting

Cutting a font down to the glyphs a page actually uses. Subsetting by text is the call to reach for, because it shapes first and so keeps the glyphs that ligatures and joining actually produced.

DAEGUN_MATH_ACCENT_BASE_HEIGHT
6

The tallest a base can be before an accent over it must be raised.

DAEGUN_MATH_AXIS_HEIGHT
5

The height of the math axis above the baseline.

The line a fraction bar sits on, and the line operators like plus and minus are centered on. Getting it from the font rather than guessing half the x-height is what makes an equation line up.

DAEGUN_MATH_DELIMITED_SUB_FORMULA_MIN_HEIGHT
2

The smallest height a sub-formula inside delimiters is laid out at.

DAEGUN_MATH_DISPLAY_OPERATOR_MIN_HEIGHT
3

The minimum height for an operator set in display style.

What makes the summation sign in a displayed equation larger than the one set inline.

DAEGUN_MATH_FLATTENED_ACCENT_BASE_HEIGHT
7

The height above which the flattened form of an accent is used instead.

DAEGUN_MATH_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN
40

The least denominator gap in display style.

DAEGUN_MATH_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN
35

The denominator drop for a fraction in display style.

DAEGUN_MATH_FRACTION_DENOMINATOR_GAP_MIN
39

The least gap between the fraction bar and a denominator.

DAEGUN_MATH_FRACTION_DENOMINATOR_SHIFT_DOWN
34

How far a denominator drops below the baseline.

DAEGUN_MATH_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN
37

The least numerator gap in display style.

DAEGUN_MATH_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP
33

The numerator rise for a fraction in display style.

DAEGUN_MATH_FRACTION_NUMERATOR_GAP_MIN
36

The least gap between a numerator and the fraction bar.

DAEGUN_MATH_FRACTION_NUMERATOR_SHIFT_UP
32

How far a numerator rises above the baseline.

DAEGUN_MATH_FRACTION_RULE_THICKNESS
38

The index of the fraction bar thickness among the math constants.

Pass it to daegun_font_math_constant. The value comes back on the 1000-unit em.

DAEGUN_MATH_KERN_BOTTOM_LEFT
3

The bottom left corner of a glyph, for math kerning.

DAEGUN_MATH_KERN_BOTTOM_RIGHT
2

The bottom right corner of a glyph, for math kerning.

DAEGUN_MATH_KERN_TOP_LEFT
1

The top left corner of a glyph, for math kerning.

DAEGUN_MATH_KERN_TOP_RIGHT
0

The top right corner of a glyph, for math kerning.

DAEGUN_MATH_LOWER_LIMIT_BASELINE_DROP_MIN
21

The least a lower limit baseline must drop below the operator.

DAEGUN_MATH_LOWER_LIMIT_GAP_MIN
20

The least gap between an operator and a limit set below it.

DAEGUN_MATH_MATH_LEADING
4

Extra leading to put between lines of math, beyond the ordinary line height.

DAEGUN_MATH_OVERBAR_EXTRA_ASCENDER
45

Extra height reserved above an overbar.

DAEGUN_MATH_OVERBAR_RULE_THICKNESS
44

The thickness of an overbar.

DAEGUN_MATH_OVERBAR_VERTICAL_GAP
43

The gap between what is being overlined and the bar itself.

DAEGUN_MATH_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT
55

How far up the radical the degree sits, as a percentage of the radical's height.

A percentage rather than a length, so it scales with however tall the radical has grown.

DAEGUN_MATH_RADICAL_DISPLAY_STYLE_VERTICAL_GAP
50

The same gap for a radical in display style.

DAEGUN_MATH_RADICAL_EXTRA_ASCENDER
52

Extra height reserved above a radical bar.

DAEGUN_MATH_RADICAL_KERN_AFTER_DEGREE
54

The space after the degree of a root, usually negative so the degree tucks into the radical.

Negative values are expected here – the degree is meant to sit inside the radical's hook.

DAEGUN_MATH_RADICAL_KERN_BEFORE_DEGREE
53

The space before the degree of a root, as in a cube root.

DAEGUN_MATH_RADICAL_RULE_THICKNESS
51

The thickness of the bar over a radical.

DAEGUN_MATH_RADICAL_VERTICAL_GAP
49

The gap between a radical sign's bar and the expression under it.

DAEGUN_MATH_SCRIPT_PERCENT_SCALE_DOWN
0

How far to scale down one level of script, as a percentage.

Typically around 70. Applies to a superscript or subscript on ordinary text.

DAEGUN_MATH_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN
1

How far to scale down two levels of script, as a percentage.

A script on a script – the exponent of an exponent – which stops shrinking after this level.

DAEGUN_MATH_SKEWED_FRACTION_HORIZONTAL_GAP
41

The horizontal separation between the parts of a skewed fraction.

DAEGUN_MATH_SKEWED_FRACTION_VERTICAL_GAP
42

The vertical separation between the parts of a skewed fraction.

DAEGUN_MATH_SPACE_AFTER_SCRIPT
17

Extra space inserted after a script before whatever follows.

DAEGUN_MATH_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN
25

The same drop for a stack set in display style.

DAEGUN_MATH_STACK_BOTTOM_SHIFT_DOWN
24

How far the bottom element of a stack drops below the baseline.

DAEGUN_MATH_STACK_DISPLAY_STYLE_GAP_MIN
27

The least gap between stack elements in display style.

DAEGUN_MATH_STACK_GAP_MIN
26

The least gap between the two elements of a stack.

DAEGUN_MATH_STACK_TOP_DISPLAY_STYLE_SHIFT_UP
23

The same shift for a stack set in display style.

DAEGUN_MATH_STACK_TOP_SHIFT_UP
22

How far the top element of a stack rises above the baseline.

DAEGUN_MATH_STRETCH_STACK_BOTTOM_SHIFT_DOWN
29

How far the bottom drops in a stack built under a stretched glyph.

DAEGUN_MATH_STRETCH_STACK_GAP_ABOVE_MIN
30

The least gap above a stretched glyph in a stretch stack.

DAEGUN_MATH_STRETCH_STACK_GAP_BELOW_MIN
31

The least gap below a stretched glyph in a stretch stack.

DAEGUN_MATH_STRETCH_STACK_TOP_SHIFT_UP
28

How far the top rises in a stack built over a stretched glyph.

DAEGUN_MATH_SUB_SUPERSCRIPT_GAP_MIN
15

The least vertical gap between a subscript and a superscript on the same base.

DAEGUN_MATH_SUBSCRIPT_BASELINE_DROP_MIN
10

The least a subscript baseline must drop below the bottom of the base.

DAEGUN_MATH_SUBSCRIPT_SHIFT_DOWN
8

How far below the baseline a subscript baseline is placed.

DAEGUN_MATH_SUBSCRIPT_TOP_MAX
9

The highest a subscript may reach, so it cannot collide with the base.

DAEGUN_MATH_SUPERSCRIPT_BASELINE_DROP_MAX
14

The most a superscript baseline may drop below the top of the base.

DAEGUN_MATH_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT
16

The lowest a superscript may sit when a subscript shares the base.

DAEGUN_MATH_SUPERSCRIPT_BOTTOM_MIN
13

The lowest a superscript may reach, so it stays clear of the base.

DAEGUN_MATH_SUPERSCRIPT_SHIFT_UP
11

How far above the baseline a superscript baseline is placed.

DAEGUN_MATH_SUPERSCRIPT_SHIFT_UP_CRAMPED
12

The superscript shift used in cramped style.

Cramped style applies under a radical or in a denominator, where vertical room is short.

DAEGUN_MATH_UNDERBAR_EXTRA_DESCENDER
48

Extra depth reserved below an underbar.

DAEGUN_MATH_UNDERBAR_RULE_THICKNESS
47

The thickness of an underbar.

DAEGUN_MATH_UNDERBAR_VERTICAL_GAP
46

The gap between what is being underlined and the bar itself.

DAEGUN_MATH_UPPER_LIMIT_BASELINE_RISE_MIN
19

The least an upper limit baseline must rise above the operator.

DAEGUN_MATH_UPPER_LIMIT_GAP_MIN
18

The least gap between an operator and a limit set above it.

The atlas packer, and rules

A shelf packer for building glyph atlases, plus small predicates over the enums this API uses.

DAEGUN_STAT_COMBO
3

A STAT record naming a combination of values across several axes at once.

DAEGUN_STAT_LINKED
2

A STAT record naming a value along with the face it pairs with.

How a family links Regular to its Bold, so a bold button knows where to go.

DAEGUN_STAT_RANGE
1

A STAT record naming a range of values on one axis rather than a single point.

DAEGUN_STAT_SINGLE
0

A STAT record naming a single point on one axis.

As opposed to a range, or a combination across several axes.

Variation data

The machinery underneath variable fonts: item variation stores, delta set index maps, and feature variations. Reach for these only when implementing variation behavior yourself.

DAEGUN_DEVICE_DISCRETE
1

A separate graphics card with its own memory.

DAEGUN_DEVICE_INTEGRATED
2

A GPU sharing memory with the CPU.

DAEGUN_DEVICE_SOFTWARE
4

A software rasterizer pretending to be a GPU.

Far slower than hardware, so the CPU path is usually the better choice.

DAEGUN_DEVICE_UNKNOWN
0

The kind of GPU could not be determined.

DAEGUN_DEVICE_VIRTUAL
3

A virtualized GPU, as presented inside a VM.

DAEGUN_GC_CLOSE_PUNCTUATION
18

Pe: a closing bracket, brace or parenthesis.

DAEGUN_GC_CONNECT_PUNCTUATION
16

Pc: connecting punctuation, chiefly the underscore.

DAEGUN_GC_CONTROL
1

Cc: a C0 or C1 control character, such as tab or newline.

DAEGUN_GC_CURRENCY_SYMBOL
23

Sc: a currency sign.

DAEGUN_GC_DASH_PUNCTUATION
17

Pd: a dash or hyphen.

DAEGUN_GC_DECIMAL_NUMBER
13

Nd: a decimal digit, in any script that has them.

DAEGUN_GC_ENCLOSING_MARK
11

Me: a mark that encloses the character before it, such as a combining circle.

DAEGUN_GC_FINAL_PUNCTUATION
19

Pf: a closing quotation mark in scripts that distinguish them.

DAEGUN_GC_FORMAT
2

Cf: an invisible formatting character.

Zero-width joiners, bidi controls, soft hyphens – they affect layout without drawing anything.

DAEGUN_GC_INITIAL_PUNCTUATION
20

Pi: an opening quotation mark in scripts that distinguish them.

DAEGUN_GC_LETTER_NUMBER
14

Nl: a numeric letter, such as a Roman numeral character.

DAEGUN_GC_LINE_SEPARATOR
27

Zl: U+2028, the explicit line separator.

DAEGUN_GC_LOWERCASE_LETTER
5

Ll: a lowercase letter.

DAEGUN_GC_MATH_SYMBOL
25

Sm: a mathematical symbol, such as plus or an integral sign.

DAEGUN_GC_MODIFIER_LETTER
6

Lm: a letter-like modifier, such as a superscript letter marking tone.

DAEGUN_GC_MODIFIER_SYMBOL
24

Sk: a modifier symbol, such as a standalone circumflex or a skin tone modifier.

DAEGUN_GC_NONSPACING_MARK
12

Mn: a combining mark that takes no width.

Accents and vowel signs. They attach to the base before them rather than advancing the pen.

DAEGUN_GC_OPEN_PUNCTUATION
22

Ps: an opening bracket, brace or parenthesis.

DAEGUN_GC_OTHER_LETTER
7

Lo: a letter with no case.

Most of the world's scripts are here: Han, Arabic, Devanagari, Hebrew, Thai.

DAEGUN_GC_OTHER_NUMBER
15

No: a number that is not a decimal digit, such as ½ or a superscript two.

DAEGUN_GC_OTHER_PUNCTUATION
21

Po: punctuation that fits none of the other classes, such as a full stop or comma.

DAEGUN_GC_OTHER_SYMBOL
26

So: a symbol that is not math, currency or a modifier.

Most emoji land here.

DAEGUN_GC_PARAGRAPH_SEPARATOR
28

Zp: U+2029, the explicit paragraph separator.

DAEGUN_GC_PRIVATE_USE
3

Co: a code point reserved for private agreement, with no standard meaning.

DAEGUN_GC_SPACE_SEPARATOR
29

Zs: a space character, including the non-breaking and thin varieties.

DAEGUN_GC_SPACING_MARK
10

Mc: a combining mark that takes width of its own, common in Indic scripts.

DAEGUN_GC_SURROGATE
4

Cs: half of a UTF-16 surrogate pair.

Never valid on its own in well-formed text.

DAEGUN_GC_TITLECASE_LETTER
8

Lt: a titlecase letter.

The rare digraphs whose titlecase form differs from their uppercase one, such as Dž.

DAEGUN_GC_UNASSIGNED
0

Cn: a code point Unicode has not assigned.

DAEGUN_GC_UPPERCASE_LETTER
9

Lu: an uppercase letter.

DAEGUN_GPU_BATCH_FULL
4

The batch has no room for this glyph's geometry; upload and clear it, then retry.

DAEGUN_GPU_NO_OUTLINE
1

The glyph has no outline to send to the GPU.

A space, or an empty glyph. Not a failure – there is simply nothing to draw.

DAEGUN_GPU_NON_FINITE
3

The outline contains a coordinate that is not finite.

A NaN or infinity from a damaged font. Refused rather than propagated into the shader.

DAEGUN_GPU_NOT_FLAT_COLOR
5

The color glyph uses gradients or compositing, which the flat-color GPU path cannot express.

DAEGUN_GPU_OK
0

The glyph was prepared for the GPU successfully.

DAEGUN_GPU_TOO_COMPLEX
2

The glyph has more curves than the GPU path can hold.

Rare, and confined to elaborate display faces. Fall back to the CPU for that glyph.

DAEGUN_MAX_SUBPIXEL_TAPS
8

The largest number of filter taps the subpixel path accepts.

DAEGUN_MAX_SUBPIXEL_WEIGHTS
64

The largest filter kernel the subpixel path accepts, in weights.

A fixed bound so the shader needs no dynamic allocation.

DAEGUN_MAX_SUPERSAMPLE
4

The highest supersampling factor the rasterizer accepts.

DAEGUN_MODE_GRAYSCALE
0

One coverage value per pixel.

Note that the grayscale pipeline replaces rather than blends – it does not set a blend state – so drawing over existing content needs the subpixel mode with a grayscale layout instead.

DAEGUN_MODE_SUBPIXEL
1

Three coverage values per pixel, one per subpixel stripe.

Triples the effective horizontal resolution on an LCD panel. With a grayscale layout it also gives you plain source-over blending, which grayscale mode does not.

DAEGUN_REFUSAL_BAD_TARGET
1

The render target is unusable – wrong size, wrong format, or already freed.

DAEGUN_REFUSAL_FAILED
3

The device accepted the work and it failed; read daegun_last_error for what it said.

DAEGUN_REFUSAL_NO_DEVICE
0

Why a backend declined, when one did. The detail is in daegun_last_error; this is the part every backend agrees on, since a VkResult means nothing to a caller drawing through Metal.

DAEGUN_REFUSAL_UNSUPPORTED
2

The device cannot do what the request needs.

DAEGUN_ROUTED_CPU
1

The router chose the CPU rasterizer for this glyph.

DAEGUN_ROUTED_FLUSH_AND_RETRY
5

The batch is full: upload what it holds, clear it, and ask again.

An instruction rather than a failure – the glyph is drawable, just not until you make room.

DAEGUN_ROUTED_GPU
2

The router chose the GPU for this glyph.

DAEGUN_ROUTED_NOTHING
0

Where the glyph belongs. Rendered::Refused carries a reason in Rust, so it is two codes here – a C caller switches once and both arms are distinct outcomes.

DAEGUN_ROUTED_REFERENCE
3

The router chose the reference rasterizer, which is used for testing.

DAEGUN_ROUTED_REFUSED_NON_FINITE
6

Refused because the request carried a size or transform that is not finite.

DAEGUN_ROUTED_REFUSED_PREFERENCE_UNMET
7

Refused because the policy demanded a path that could not serve this glyph.

What you get from insisting on the GPU for a glyph the GPU path cannot take. Relax the policy or fall back.

DAEGUN_ROUTED_SCENE
4

The glyph is a color glyph and was rendered to a full RGBA scene.

DAEGUN_SHADER_GLSL
0

The shader source, so an application that already owns a device can compile the pipeline itself and draw daegun's output through it.

DAEGUN_SHADER_HLSL
1

High Level Shading Language, the shader source flavour for Direct3D.

DAEGUN_SHADER_MSL
2

Metal Shading Language, the shader source flavour for Apple platforms.

daegun ships its shaders as GLSL, HLSL and MSL source, so you compile the one your backend needs.

DAEGUN_STAGE_FRAGMENT
1

The fragment stage of the glyph shader, producing grayscale coverage.

DAEGUN_STAGE_SUBPIXEL_FRAGMENT
2

The fragment stage that produces subpixel coverage, three channels instead of one.

DAEGUN_STAGE_VERTEX
0

The vertex stage of the glyph shader.

Type to search.