Area-coverage antialiasing 2026-11-05
Area-coverage antialiasing assigns an edge pixel a value based on the fraction of its footprint covered by a geometric shape. In a simple rasterization model with constant foreground value , constant background value , and a uniformly weighted pixel region , let be the shape. ThenEquivalently, is the average of the shape's indicator function over . This is a spatial average: a partially covered opaque shape can produce an intermediate pixel value without its material being transparent. Filtering the image over a finite region reduces the abrupt changes produced by deciding coverage at one sample point.[ref]
For a worked example, take the unit-square pixel and a white shape covering over a black background. The diagonal divides the square into equal areas, so and the pixel gets half the white value. A single center sample lies exactly on the edge and must choose one side by a convention; a tiny edge movement can flip that binary decision. The covered area instead changes continuously. The arithmetic applies to values proportional to light, before a nonlinear display encoding.
Exact geometric coverage and multiple sample tests are two ways of estimating this average; a finite set of samples can miss a sufficiently thin shape. Uniform footprint averaging also has limits: its abrupt filter boundary does not remove every high-frequency component, so it reduces aliasing without guaranteeing a perfectly band-limited image.[ref]
Physically Based Rendering: From Theory to Implementation (4th edition) by Matt Pharr and others. section 8.8.1, box filter and residual aliasing
Computer graphics Created 2026-10-13 Updated 2026-11-05
Computer graphics creates visual representations from geometric models and numerical data. Vector graphics store shapes and drawing instructions, while raster graphics store an array of pixels. A drawing may use both: a geometric object can be rendered into a raster image and then combined with existing image data.
For example, three points specify a triangle. A perspective projection maps its geometry into a camera view, and rasterization determines contributions to output pixels. Their values can depend on a color model, surface response and illumination; ray tracing provides another way to determine visible surface interactions.
The stored representation and the sampled output answer different questions. A smooth geometric boundary can cross a pixel footprint, so choosing only one sample may introduce aliasing. Raster sampling and reconstruction makes that loss of detail explicit. Image processing then transforms an existing image, while computer graphics can generate one from a geometric description.
Depth buffer 2026-11-05
A depth buffer stores a depth value for each covered framebuffer sample so that rasterization can resolve visibility. With the common “less” comparison, a new fragment contributes only when its depth is smaller than the stored value; an accepted fragment can then update that value. Thus the nearest opaque surface can win even when primitives arrive in a different order.[ref]
For example, starting from depth 1, an opaque fragment at 0.7 passes, then one at 0.2 replaces it; a later fragment at 0.8 fails. Reversing the first two arrivals gives the same visible surface. Finite precision can make nearly coincident surfaces compare inconsistently. Transparent surfaces also require additional treatment: selecting one nearest depth alone cannot combine light from several layers.
Font hinting 2026-11-05
Font hinting guides the adjustment of a scaled outline font to the target pixel grid before rasterization. In TrueType, instructions can control how outline points move at a particular size and resolution. Grid fitting can preserve important strokes when faithful geometric scaling would leave them awkwardly positioned between pixels.[ref]
TrueType Fundamentals by Microsoft. From Font File to Paper; Instructing Outlines: scaling, grid fitting and scan conversion
For an idealized example, two equal-width vertical strokes can overlap different fractions of neighboring pixels after scaling. Their rasterized darkness can then differ despite equal geometric widths. Coordinating the adjusted stroke positions and widths can make their displayed weights more consistent. The target depends on the requested size: a correction suitable for a small glyph need not be appropriate when many more pixels resolve its outline.
Font hinting changes the geometry used for rendering, rather than the underlying Unicode text or its grapheme clusters. Glyph substitution, glyph positioning and font hinting solve different parts of the path from encoded text to a visible image.
Font metric 2026-11-05
A font metric is a numerical measurement used to position text from a computer font. Measurements include glyph advances, glyph bearings, bounding boxes and face-level quantities such as font ascent, font descent and font line gap. These describe both logical movement and the geometry of the visible shapes.[ref]
For a horizontal example, put the pen position at , let a glyph have advance 12, and let its ink extend from to . Its ink width is , while the next pen position is . The negative left glyph bearing describes an overhang; it does not imply a negative glyph advance.
A separate example illustrates vertical conventions. With font ascent , signed descent and font line gap , the metric-based baseline separation isSome font formats store the descent magnitude with the opposite sign, so the convention must be checked before using the formula.[ref]
Glyph Metrics in the FreeType documentation. §2: ascent, signed descent and linespace formula
These measurements inform layout before rasterization determines the actual pixels. Font size 2026-11-05
The font size sets the nominal scale at which a font is used. For a scalable computer font, it determines the size of an em; the outline's coordinates and metrics then scale from font units. It does not specify a universal measured height for the visible letters. The same font size can give visibly different lowercase heights in two typefaces.[ref]
CSS Fonts Module Level 4 by W3C. Section2.5: definition of font-size and the note about EM boxes and apparent size
For a concrete geometric example, suppose two computer fonts have x-heights equal to 0.45 and 0.60 of an em. At a nominal 16 pixels per em, the ideal scaled heights are 7.2 and 9.6 pixels, respectively. Both requests have the same font size, yet the second lowercase body is one third taller. These are hypothetical metrics, before grid fitting.
Equal font sizes can produce different x-heights
. Original toy letterforms with x-heights of 0.45 and 0.60 em at a nominal scale of 16 pixels per em. The ideal heights are 7.2 and 9.6 pixels; these are schematic shapes rather than measured computer fonts or a demonstration of rasterization. Details.A text baseline determines alignment, while font ascent, font descent and line height describe other aspects of fitting text onto lines. Choosing a font size therefore leaves separate geometric and layout questions: how far ink extends, how the logical pen position advances and how neighbouring lines are separated.
Fragment shader 2026-11-05
A fragment shader is a programmable stage of the rasterization pipeline that computes values for a fragment, such as its output color and optionally its depth. It receives interpolated data from rasterized primitives and can use texture mapping to sample an image. A fragment is a candidate contribution; later tests and blending determine what reaches the final digital image.[ref]
The OpenGL Graphics System Version 4.6 Core Profile by Khronos Group. Chapter 15, Fragment Shaders; Chapter 17, per-fragment operations
For example, a shader can multiply a surface's interpolated color by a sampled image to decorate a triangle. A fragment hidden behind a nearer opaque surface may fail the depth buffer test. With multiple samples per pixel, fragments, shader invocations and final pixels need not correspond one to one.
Glyph positioning 2026-11-05
Glyph positioning assigns locations to the glyphs selected during text shaping. It specifies how each glyph is placed and how the logical pen position progresses through the text. A text baseline supplies a common reference for placing the shapes. An OpenType GPOS table can adjust horizontal and vertical placement, glyph advances and attachment between selected glyphs.[ref]
Glyph Positioning Table by Microsoft. Overview, ValueRecords and positioning/attachment lookup types
A simple coordinate model separates the two effects. Let be the pen position, a placement offset and the glyph advance. Draw glyph with its origin atthen update the logical position byChanging moves the current shape; changing moves the starting position of subsequent shapes.
For example, a combining character can select an accent glyph that must be positioned above an earlier base glyph. The accent's placement and its glyph advance answer different questions. Kerning similarly changes spacing according to context, while glyph substitution changes which forms are selected. These choices precede the rasterization of the placed outlines into pixels.
Grid fitting 2026-11-05
Grid fitting adjusts scaled glyph geometry relative to a target pixel grid before rasterization. TrueType font hinting can move outline points to preserve important strokes and alignment at small sizes. The result depends on the requested resolution and transformation.[ref]
TrueType Fundamentals by Microsoft. From Font File to Paper; instructions and grid-fitting distortions
A simple area-coverage antialiasing model shows the problem. A vertical stroke from horizontal coordinate 0.4 to 1.6 covers 60 percent of each of two neighboring pixel columns. An equal-width stroke from 3.9 to 5.1 covers 10 percent, 100 percent and 10 percent of three columns. Both geometries have width 1.2 pixels, yet their darkest columns differ. Snapping their boundaries to give each stroke one full column changes the outlines but gives consistent displayed stroke weights.
This is a tradeoff between geometric fidelity and small-size legibility, rather than a change to the stored Unicode text. Grid fitting operates on the geometry supplied to the rasterization step; glyph substitution and glyph positioning address the forms and layout that precede it.
Pixel coverage before and after grid fitting
. Original ideal area-coverage antialiasing model of rectangular strokes, not measurements of a particular computer font. The unfitted strokes both have width 1.2 pixels, but their placements give different column coverage. The fitted strokes each occupy one full column; their changed geometry is explicit. Red dashed lines mark the geometric stroke boundaries. Details. Khronos Group 2026-11-05
The Khronos Group publishes interoperability specifications for graphics and related computational interfaces. Its OpenGL specification defines a rendering pipeline, including rasterization, fragment shaders and per-fragment operations. A specification makes observable behavior portable across implementations: for example, a configured depth buffer comparison determines whether a candidate surface contributes to the framebuffer. This is a definition of an interface contract, rather than a requirement that all implementations use identical internal hardware.[ref]
https://www.khronos.org/about/. Organizational description and open interoperability standards
[ref]The OpenGL Graphics System Version 4.6 Core Profile by Khronos Group. Chapters 14, 15 and 17
Mathematical font constant 2026-11-05
A mathematical font constant is a font-specific parameter used in mathematical typesetting. The
MathConstants portion of an OpenType MATH table supplies distances, percentages and other parameters, including the Math axis offset and script scaling.[ref]MATH - The Mathematical Typesetting Table by Microsoft. MathConstants table; MathValueRecord
For an invented distance example, suppose a computer font uses 1000 font units per em and specifies
fractionRuleThickness as 40 font units. At 25 pixels per em, the ideal typeset fraction bar thickness isAt 50 pixels per em, the same stored value gives 2 pixels before rasterization adjustments. A percentage value such as 80, however, is a ratio and must not be converted as though it meant 80 font units.Keeping the units explicit prevents plausible-looking scale errors. Suggested values in the specification guide font design; they are not universal dimensions shared by every computer font.
OpenGL 2026-11-05
OpenGL is a graphics programming interface that specifies commands, data objects and rendering behavior independently of a particular graphics processor. An application supplies geometric primitives and programs for programmable stages; the implementation transforms, rasterizes and combines their contributions into a framebuffer. Khronos Group publishes the specification, including the distinction between core and compatibility profiles.[ref]
The OpenGL Graphics System Version 4.6 Core Profile by Khronos Group. Chapter 2, OpenGL Fundamentals; Chapter 11, Programmable Vertex Processing
For example, drawing an opaque triangle requires vertex data, appropriate shader programs and a draw command. The triangle can generate fragments during rasterization; a fragment shader determines their candidate outputs, and a depth buffer test can reject hidden contributions. The interface specifies the results these operations must produce, while implementations can use different internal hardware and scheduling. A rendering command's submission is also distinct from completion of the corresponding device work.[ref]
The OpenGL Graphics System Version 4.6 Core Profile by Khronos Group. Chapters 14, 15 and 17, rasterization, fragment shading and per-fragment operations; §2.3, command execution
Outline font Created 2026-10-13 Updated 2026-11-05
An outline font stores glyph shapes as geometric boundaries that can be scaled before drawing. Bézier curves provide editable segments of these boundaries. TrueType outlines use quadratic Bézier curves; Type 2 charstrings used in Compact Font Format outlines use cubic Bézier curves. [ref]
https://learn.microsoft.com/en-us/typography/opentype/spec/ttch01. OpenType specification, TrueType fundamentals: outlines
[ref]https://adobe-type-tools.github.io/font-tech-notes/pdfs/5177.Type2.pdf. Adobe, The Type 2 Charstring Format, section 4.1
Pixels per em 2026-11-05
Pixels per em specifies the raster scale of one em. If font units make an em and the requested scale is pixels per em, a design length becomes pixels before grid fitting. The value measures the nominal typographic scale rather than the ink height of an individual glyph.[ref]
For output with a stated physical raster resolution of pixels per inch, a font size of digital typographic points givesThe factor 72 comes from the digital typographic point convention. For example, and give 24 pixels per em; a hypothetical glyph advance of 0.6 em then scales to 14.4 pixels. Doubling doubles the pixel count while preserving the requested physical length.
Horizontal and vertical pixel density can differ, in which case the two directions have distinct pixels per em. An application can also impose its own screen-to-physical-unit mapping. One must state which scale is being used rather than infer the physical size from a pixel count alone. Rasterization and grid fitting then determine how the scaled geometry becomes a visible image.
Rasterization 2026-11-05
Rasterization converts geometric primitives into candidate contributions at discrete pixel sample positions. For a projected triangle, an implementation tests which samples lie inside its three oriented edges and interpolates attributes from the vertices. With barycentric coordinates , a screen-space linear attribute is . Attributes defined before perspective projection generally need perspective-correct interpolation:Here are the clip-coordinate denominators. Ordinary interpolation would distort a texture seen at an angle.
A generated fragment is not necessarily a final visible pixel: a fragment shader determines its values, a depth buffer can reject hidden contributions, and blending combines surviving contributions. Multiple samples per pixel improve coverage estimates near boundaries but do not recreate arbitrarily fine detail. OpenGL specifies these stages separately, so geometric coverage and final image storage must not be conflated.[ref]
The OpenGL Graphics System Version 4.6 Core Profile by Khronos Group. Chapter14, rasterization and early tests; Chapter15, fragment shading
Text shaping 2026-11-05
Text shaping turns a sequence of Unicode text characters into a layout of glyphs from a chosen computer font. The result includes glyph indices, positions and glyph advances. A text character therefore does not determine a visible shape independently of its neighbors, writing system and selected computer font.[ref]
Shaping concepts in the HarfBuzz Manual. Text shaping: Unicode input, font-dependent two-dimensional glyph layout and shaping models
For example, the stored sequence
f followed by i can become a single typographic ligature. Contextual Arabic forms illustrate a different requirement: a letter's neighbors influence the selected glyph. Glyph substitution chooses forms, while glyph positioning places the chosen forms; kerning adjusts their spacing. These operations can preserve the original Unicode text, so copying text should not be implemented by reading glyph indices as if they were code points.[ref]Glyph Substitution Table by Microsoft. Overview: Arabic contextual forms, Latin ligatures and the character/glyph distinction
Text shaping precedes rasterization: first determine what shapes to draw and where; then determine the pixels that represent those shapes at the requested size.
Texture mapping 2026-11-05
Texture mapping associates surface locations with values sampled from an image or other texture data. In a common two-dimensional case, each vertex carries coordinates identifying a location in the texture. Rasterization interpolates the coordinates, and a fragment shader uses them to obtain a color or another surface parameter.[ref]
The OpenGL Graphics System Version 4.6 Core Profile by Khronos Group. Chapter 8, Textures; Chapter 15, fragment-shader inputs
For example, a square wall can use , , and at its corners so a rectangular image covers it once. Repeating coordinates from zero to four can tile the same image when the wrapping mode allows repetition. The mapping is separate from sampling: nearest-sample selection and interpolation can give visibly different results from identical coordinates.
When a tilted surface is viewed through perspective projection, equal distances on the surface need not occupy equal distances on screen. Correct interpolation must account for that projection. A texture also supplies data rather than an automatic physical material model: a stored color and the light reflected toward the camera are different quantities.
TrueType 2026-11-05
TrueType is a computer font technology whose glyph outlines use quadratic Bézier curves and straight segments. The stored coordinates describe a scalable design in font units. Rendering scales that geometry to the requested size and applies rasterization to obtain pixels.
At small display sizes, geometrically accurate scaling can place important strokes between pixels. Font hinting supplies instructions that adjust the scaled outline relative to the output grid, helping preserve recognizable strokes and spacing. A small capital letter can therefore require more than shrinking a large image: the useful result depends on the relation between its geometry and the pixel grid.[ref]
TrueType Fundamentals by Microsoft. Outlines; Font units and scaling; Instructing outlines; Scan conversion
TrueType outlines can be stored in an OpenType computer font. The outline technology and the larger table-based file format describe different layers of the same rendering system.
Typography Created 2026-10-13 Updated 2026-11-05
Typography concerns the selection and arrangement of written forms. In digital systems, the visible result depends on several distinct operations: interpreting text characters, selecting glyphs from a computer font, positioning them, and converting their geometry into pixels through rasterization.
This distinction matters when a document looks wrong. Missing glyphs, incorrect glyph substitutions and poorly rendered pixels can produce different failures even when the underlying Unicode text is unchanged.[ref]
OpenType Layout Overview by Microsoft. Characters versus glyphs and OpenType Layout terminology: abstract characters, visual glyphs, substitution and positioning

