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_FULL6The GPU batch cannot take more geometry.
Upload and clear the batch, then retry the glyph.
DAEGUN_DRAWN_CPU1The glyph was rasterized on the CPU and a bitmap is available.
DAEGUN_DRAWN_GPU2The glyph was added to the GPU batch and a slot is available to instance.
DAEGUN_DRAWN_GPU_COLOR3A color glyph was added to the GPU batch as one slot per layer.
DAEGUN_DRAWN_NOTHING0The glyph had no ink, so nothing was drawn.
Normal for a space. Not a failure –
daegun_drawn_is_okstill reports true.DAEGUN_DRAWN_REFERENCE5The glyph was rasterized by the reference CPU rasterizer.
DAEGUN_DRAWN_REFUSED7The 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_SCENE4A color glyph was rendered to finished RGBA pixels.
DAEGUN_PAINT_COLR_GLYPH2Draws 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_COMPOSITE13Combines 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_GLYPH1Clips its child to the outline of a glyph.
The shape comes from the glyph; the color comes from whatever the child paints.
DAEGUN_PAINT_LAYERS0A stack of child paints, drawn back to front.
Its children are the layers, in painting order. Like every node it names them through
child_startandchild_count, so walking a graph needs no knowledge of which kind you are looking at.DAEGUN_PAINT_LINEAR_GRADIENT4A gradient along a line.
numbers[0..6)isx0, y0, x1, y1, x2, y2: the start, the end, and the rotation point.DAEGUN_PAINT_RADIAL_GRADIENT5A gradient between two circles.
numbers[0..6)isx0, 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_ROTATE11Rotates its child.
numbers[0..1)is the angle, andnumbers[4..6)is the center whenhas_centeris set.DAEGUN_PAINT_SCALE9Scales its child on each axis independently.
numbers[0..2)issx, sy, andnumbers[4..6)is the center whenhas_centeris set.DAEGUN_PAINT_SCALE_UNIFORM10Scales its child equally on both axes.
numbers[0..1)is the factor, andnumbers[4..6)is the center whenhas_centeris set.DAEGUN_PAINT_SKEW12Skews its child on each axis.
numbers[0..2)isx_angle, y_angle, andnumbers[4..6)is the center whenhas_centeris set.DAEGUN_PAINT_SOLID3A single flat color, taken from the palette or from your text color.
DAEGUN_PAINT_SWEEP_GRADIENT6A gradient swept around a center point.
numbers[0..4)iscx, cy, start_angle, end_angle.DAEGUN_PAINT_TRANSFORM7Applies an arbitrary affine transform to its child.
numbers[0..6)is the matrix.DAEGUN_PAINT_TRANSLATE8Moves its child.
numbers[0..2)isdx, dy.DAEGUN_PREFER_AUTO0Let the router decide per glyph whether the CPU or the GPU is the better path.
DAEGUN_PREFER_CPU1Always rasterize on the CPU.
DAEGUN_PREFER_GPU2Prefer the GPU wherever the request can be served there.
DAEGUN_PREFER_REFERENCE3Use 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_BASE0An ordinary glyph that advances the pen and can carry marks.
DAEGUN_GLYPH_CLASS_COMPONENT3A piece of a composite glyph, not meant to be drawn on its own.
DAEGUN_GLYPH_CLASS_LIGATURE1A glyph standing for several characters at once.
Cursor positions within it come from
daegun_font_ligature_carets.DAEGUN_GLYPH_CLASS_MARK2A 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_CURVE0x01The 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_CENTER2Lines are centered within the measure.
DAEGUN_ALIGN_END1Lines align to the end of the measure, following the paragraph direction.
DAEGUN_ALIGN_JUSTIFY3Lines 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_START0Lines 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_GREEDY0Break 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_OPTIMAL1Search 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_MIXED0In 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_SIDEWAYS2Every glyph is rotated in vertical text, including those that would normally stay upright.
DAEGUN_ORIENTATION_UPRIGHT1Every glyph stays upright in vertical text, including Latin.
DAEGUN_WRITING_HORIZONTAL0Text runs horizontally, lines advancing downward.
DAEGUN_WRITING_VERTICAL_LR2Text runs top to bottom with successive lines advancing to the right.
DAEGUN_WRITING_VERTICAL_RL1Text 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((1uThe 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_BUTT0A stroke ends exactly at its endpoint, squared off.
DAEGUN_CAP_ROUND1A stroke ends in a semicircle centered on its endpoint, extending half the width past it.
DAEGUN_CAP_SQUARE2A stroke ends in a square extending half the width past its endpoint.
DAEGUN_HINT_AUTO3Use 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_FORCE4Use 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_CLASSIC2Run 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_NONE0Do 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_SUBPIXEL1Hint 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_BEVEL2Stroke joins are cut off flat across the corner.
DAEGUN_JOIN_MITER0Stroke joins come to a sharp point.
A very shallow angle produces a very long spike, which is why the other joins exist.
DAEGUN_JOIN_ROUND1Stroke joins are rounded off with an arc.
DAEGUN_LAYOUT_BGR_H2Horizontal stripes in blue, green, red order.
DAEGUN_LAYOUT_BGR_H_UNFILTERED6Horizontal BGR stripes with no filtering applied.
DAEGUN_LAYOUT_BGR_V4Vertical stripes in blue, green, red order.
DAEGUN_LAYOUT_BGR_V_UNFILTERED8Vertical BGR stripes with no filtering applied.
DAEGUN_LAYOUT_GRAYSCALE0Where 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_H1Horizontal stripes in red, green, blue order – the most common desktop LCD.
DAEGUN_LAYOUT_RGB_H_UNFILTERED5Horizontal 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_V3Vertical stripes in red, green, blue order, as on a rotated display.
DAEGUN_LAYOUT_RGB_V_UNFILTERED7Vertical 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_EVENODD1Fill 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_NONZERO0Fill 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_CLOSE4Closes the current contour back to its starting point.
DAEGUN_VERB_CUBIC3A cubic curve through two control points – what CFF outlines are made of.
DAEGUN_VERB_LINE1A straight segment to one point.
DAEGUN_VERB_MOVE0What each verb takes from the point array, in order.
DAEGUN_VERB_QUAD2A 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_GLYPH2The class an Apple state machine assigns to a glyph it has removed.
DAEGUN_AAT_CLASS_END_OF_TEXT0The classes and state every morx machine starts from.
DAEGUN_AAT_STATE_START_OF_TEXT0The 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_CHARACTERS2Character-level clusters with no monotonicity guarantee.
Cluster values may decrease across a reordering, so they cannot be binary searched.
DAEGUN_CLUSTER_GRAPHEMES3Grapheme-level clusters with no monotonicity guarantee.
DAEGUN_CLUSTER_MONOTONE_CHARACTERS1Cluster 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_GRAPHEMES0Cluster 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_HIDE0Default-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_PRESERVE2Default-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_REMOVE1Default-ignorable characters are removed from the output entirely.
Fewer glyphs, but the mapping back to source characters no longer covers them.
Status
DAEGUN_ABSENT-4The font does not carry what was asked for.
Not an error in most cases – a font with no
MATHtable, no vertical metrics or no glyph names is perfectly valid. Treat it as "no answer" and fall back.DAEGUN_NULL-1A 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_OK0The call succeeded and the out parameter has been written.
The only non-negative status. Every other code is negative, so
status != DAEGUN_OKandstatus < 0mean the same thing – test whichever reads better.DAEGUN_PARSE-2The 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_errorfor 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-3An 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-5The 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_HEIGHT6The tallest a base can be before an accent over it must be raised.
DAEGUN_MATH_AXIS_HEIGHT5The 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_HEIGHT2The smallest height a sub-formula inside delimiters is laid out at.
DAEGUN_MATH_DISPLAY_OPERATOR_MIN_HEIGHT3The 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_HEIGHT7The height above which the flattened form of an accent is used instead.
DAEGUN_MATH_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN40The least denominator gap in display style.
DAEGUN_MATH_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN35The denominator drop for a fraction in display style.
DAEGUN_MATH_FRACTION_DENOMINATOR_GAP_MIN39The least gap between the fraction bar and a denominator.
DAEGUN_MATH_FRACTION_DENOMINATOR_SHIFT_DOWN34How far a denominator drops below the baseline.
DAEGUN_MATH_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN37The least numerator gap in display style.
DAEGUN_MATH_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP33The numerator rise for a fraction in display style.
DAEGUN_MATH_FRACTION_NUMERATOR_GAP_MIN36The least gap between a numerator and the fraction bar.
DAEGUN_MATH_FRACTION_NUMERATOR_SHIFT_UP32How far a numerator rises above the baseline.
DAEGUN_MATH_FRACTION_RULE_THICKNESS38The 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_LEFT3The bottom left corner of a glyph, for math kerning.
DAEGUN_MATH_KERN_BOTTOM_RIGHT2The bottom right corner of a glyph, for math kerning.
DAEGUN_MATH_KERN_TOP_LEFT1The top left corner of a glyph, for math kerning.
DAEGUN_MATH_KERN_TOP_RIGHT0The top right corner of a glyph, for math kerning.
DAEGUN_MATH_LOWER_LIMIT_BASELINE_DROP_MIN21The least a lower limit baseline must drop below the operator.
DAEGUN_MATH_LOWER_LIMIT_GAP_MIN20The least gap between an operator and a limit set below it.
DAEGUN_MATH_MATH_LEADING4Extra leading to put between lines of math, beyond the ordinary line height.
DAEGUN_MATH_OVERBAR_EXTRA_ASCENDER45Extra height reserved above an overbar.
DAEGUN_MATH_OVERBAR_RULE_THICKNESS44The thickness of an overbar.
DAEGUN_MATH_OVERBAR_VERTICAL_GAP43The gap between what is being overlined and the bar itself.
DAEGUN_MATH_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT55How 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_GAP50The same gap for a radical in display style.
DAEGUN_MATH_RADICAL_EXTRA_ASCENDER52Extra height reserved above a radical bar.
DAEGUN_MATH_RADICAL_KERN_AFTER_DEGREE54The 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_DEGREE53The space before the degree of a root, as in a cube root.
DAEGUN_MATH_RADICAL_RULE_THICKNESS51The thickness of the bar over a radical.
DAEGUN_MATH_RADICAL_VERTICAL_GAP49The gap between a radical sign's bar and the expression under it.
DAEGUN_MATH_SCRIPT_PERCENT_SCALE_DOWN0How 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_DOWN1How 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_GAP41The horizontal separation between the parts of a skewed fraction.
DAEGUN_MATH_SKEWED_FRACTION_VERTICAL_GAP42The vertical separation between the parts of a skewed fraction.
DAEGUN_MATH_SPACE_AFTER_SCRIPT17Extra space inserted after a script before whatever follows.
DAEGUN_MATH_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN25The same drop for a stack set in display style.
DAEGUN_MATH_STACK_BOTTOM_SHIFT_DOWN24How far the bottom element of a stack drops below the baseline.
DAEGUN_MATH_STACK_DISPLAY_STYLE_GAP_MIN27The least gap between stack elements in display style.
DAEGUN_MATH_STACK_GAP_MIN26The least gap between the two elements of a stack.
DAEGUN_MATH_STACK_TOP_DISPLAY_STYLE_SHIFT_UP23The same shift for a stack set in display style.
DAEGUN_MATH_STACK_TOP_SHIFT_UP22How far the top element of a stack rises above the baseline.
DAEGUN_MATH_STRETCH_STACK_BOTTOM_SHIFT_DOWN29How far the bottom drops in a stack built under a stretched glyph.
DAEGUN_MATH_STRETCH_STACK_GAP_ABOVE_MIN30The least gap above a stretched glyph in a stretch stack.
DAEGUN_MATH_STRETCH_STACK_GAP_BELOW_MIN31The least gap below a stretched glyph in a stretch stack.
DAEGUN_MATH_STRETCH_STACK_TOP_SHIFT_UP28How far the top rises in a stack built over a stretched glyph.
DAEGUN_MATH_SUB_SUPERSCRIPT_GAP_MIN15The least vertical gap between a subscript and a superscript on the same base.
DAEGUN_MATH_SUBSCRIPT_BASELINE_DROP_MIN10The least a subscript baseline must drop below the bottom of the base.
DAEGUN_MATH_SUBSCRIPT_SHIFT_DOWN8How far below the baseline a subscript baseline is placed.
DAEGUN_MATH_SUBSCRIPT_TOP_MAX9The highest a subscript may reach, so it cannot collide with the base.
DAEGUN_MATH_SUPERSCRIPT_BASELINE_DROP_MAX14The most a superscript baseline may drop below the top of the base.
DAEGUN_MATH_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT16The lowest a superscript may sit when a subscript shares the base.
DAEGUN_MATH_SUPERSCRIPT_BOTTOM_MIN13The lowest a superscript may reach, so it stays clear of the base.
DAEGUN_MATH_SUPERSCRIPT_SHIFT_UP11How far above the baseline a superscript baseline is placed.
DAEGUN_MATH_SUPERSCRIPT_SHIFT_UP_CRAMPED12The 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_DESCENDER48Extra depth reserved below an underbar.
DAEGUN_MATH_UNDERBAR_RULE_THICKNESS47The thickness of an underbar.
DAEGUN_MATH_UNDERBAR_VERTICAL_GAP46The gap between what is being underlined and the bar itself.
DAEGUN_MATH_UPPER_LIMIT_BASELINE_RISE_MIN19The least an upper limit baseline must rise above the operator.
DAEGUN_MATH_UPPER_LIMIT_GAP_MIN18The 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_COMBO3A
STATrecord naming a combination of values across several axes at once.DAEGUN_STAT_LINKED2A
STATrecord 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_RANGE1A
STATrecord naming a range of values on one axis rather than a single point.DAEGUN_STAT_SINGLE0A
STATrecord 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_DISCRETE1A separate graphics card with its own memory.
DAEGUN_DEVICE_INTEGRATED2A GPU sharing memory with the CPU.
DAEGUN_DEVICE_SOFTWARE4A software rasterizer pretending to be a GPU.
Far slower than hardware, so the CPU path is usually the better choice.
DAEGUN_DEVICE_UNKNOWN0The kind of GPU could not be determined.
DAEGUN_DEVICE_VIRTUAL3A virtualized GPU, as presented inside a VM.
DAEGUN_GC_CLOSE_PUNCTUATION18Pe: a closing bracket, brace or parenthesis.
DAEGUN_GC_CONNECT_PUNCTUATION16Pc: connecting punctuation, chiefly the underscore.
DAEGUN_GC_CONTROL1Cc: a C0 or C1 control character, such as tab or newline.
DAEGUN_GC_CURRENCY_SYMBOL23Sc: a currency sign.
DAEGUN_GC_DASH_PUNCTUATION17Pd: a dash or hyphen.
DAEGUN_GC_DECIMAL_NUMBER13Nd: a decimal digit, in any script that has them.
DAEGUN_GC_ENCLOSING_MARK11Me: a mark that encloses the character before it, such as a combining circle.
DAEGUN_GC_FINAL_PUNCTUATION19Pf: a closing quotation mark in scripts that distinguish them.
DAEGUN_GC_FORMAT2Cf: an invisible formatting character.
Zero-width joiners, bidi controls, soft hyphens – they affect layout without drawing anything.
DAEGUN_GC_INITIAL_PUNCTUATION20Pi: an opening quotation mark in scripts that distinguish them.
DAEGUN_GC_LETTER_NUMBER14Nl: a numeric letter, such as a Roman numeral character.
DAEGUN_GC_LINE_SEPARATOR27Zl: U+2028, the explicit line separator.
DAEGUN_GC_LOWERCASE_LETTER5Ll: a lowercase letter.
DAEGUN_GC_MATH_SYMBOL25Sm: a mathematical symbol, such as plus or an integral sign.
DAEGUN_GC_MODIFIER_LETTER6Lm: a letter-like modifier, such as a superscript letter marking tone.
DAEGUN_GC_MODIFIER_SYMBOL24Sk: a modifier symbol, such as a standalone circumflex or a skin tone modifier.
DAEGUN_GC_NONSPACING_MARK12Mn: 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_PUNCTUATION22Ps: an opening bracket, brace or parenthesis.
DAEGUN_GC_OTHER_LETTER7Lo: a letter with no case.
Most of the world's scripts are here: Han, Arabic, Devanagari, Hebrew, Thai.
DAEGUN_GC_OTHER_NUMBER15No: a number that is not a decimal digit, such as ½ or a superscript two.
DAEGUN_GC_OTHER_PUNCTUATION21Po: punctuation that fits none of the other classes, such as a full stop or comma.
DAEGUN_GC_OTHER_SYMBOL26So: a symbol that is not math, currency or a modifier.
Most emoji land here.
DAEGUN_GC_PARAGRAPH_SEPARATOR28Zp: U+2029, the explicit paragraph separator.
DAEGUN_GC_PRIVATE_USE3Co: a code point reserved for private agreement, with no standard meaning.
DAEGUN_GC_SPACE_SEPARATOR29Zs: a space character, including the non-breaking and thin varieties.
DAEGUN_GC_SPACING_MARK10Mc: a combining mark that takes width of its own, common in Indic scripts.
DAEGUN_GC_SURROGATE4Cs: half of a UTF-16 surrogate pair.
Never valid on its own in well-formed text.
DAEGUN_GC_TITLECASE_LETTER8Lt: a titlecase letter.
The rare digraphs whose titlecase form differs from their uppercase one, such as Dž.
DAEGUN_GC_UNASSIGNED0Cn: a code point Unicode has not assigned.
DAEGUN_GC_UPPERCASE_LETTER9Lu: an uppercase letter.
DAEGUN_GPU_BATCH_FULL4The batch has no room for this glyph's geometry; upload and clear it, then retry.
DAEGUN_GPU_NO_OUTLINE1The 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_FINITE3The 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_COLOR5The color glyph uses gradients or compositing, which the flat-color GPU path cannot express.
DAEGUN_GPU_OK0The glyph was prepared for the GPU successfully.
DAEGUN_GPU_TOO_COMPLEX2The 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_TAPS8The largest number of filter taps the subpixel path accepts.
DAEGUN_MAX_SUBPIXEL_WEIGHTS64The largest filter kernel the subpixel path accepts, in weights.
A fixed bound so the shader needs no dynamic allocation.
DAEGUN_MAX_SUPERSAMPLE4The highest supersampling factor the rasterizer accepts.
DAEGUN_MODE_GRAYSCALE0One 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_SUBPIXEL1Three 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_TARGET1The render target is unusable – wrong size, wrong format, or already freed.
DAEGUN_REFUSAL_FAILED3The device accepted the work and it failed; read
daegun_last_errorfor what it said.DAEGUN_REFUSAL_NO_DEVICE0Why 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_UNSUPPORTED2The device cannot do what the request needs.
DAEGUN_ROUTED_CPU1The router chose the CPU rasterizer for this glyph.
DAEGUN_ROUTED_FLUSH_AND_RETRY5The 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_GPU2The router chose the GPU for this glyph.
DAEGUN_ROUTED_NOTHING0Where 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_REFERENCE3The router chose the reference rasterizer, which is used for testing.
DAEGUN_ROUTED_REFUSED_NON_FINITE6Refused because the request carried a size or transform that is not finite.
DAEGUN_ROUTED_REFUSED_PREFERENCE_UNMET7Refused 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_SCENE4The glyph is a color glyph and was rendered to a full RGBA scene.
DAEGUN_SHADER_GLSL0The shader source, so an application that already owns a device can compile the pipeline itself and draw daegun's output through it.
DAEGUN_SHADER_HLSL1High Level Shading Language, the shader source flavour for Direct3D.
DAEGUN_SHADER_MSL2Metal 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_FRAGMENT1The fragment stage of the glyph shader, producing grayscale coverage.
DAEGUN_STAGE_SUBPIXEL_FRAGMENT2The fragment stage that produces subpixel coverage, three channels instead of one.
DAEGUN_STAGE_VERTEX0The vertex stage of the glyph shader.