Fact-checked by Grok 2 weeks ago

Twip

A twip is a used in and , defined as one-twentieth of a printer's point or 1/1440 of an inch (approximately 17.64 micrometers). The term "twip" is an for "twentieth of a point," referring to the traditional typographical point as a base unit. Twips provide a device-independent scale for precise positioning and sizing of text, graphics, and layouts in environments, particularly within Windows applications and file formats. This unit ensures consistent rendering across varying screen resolutions and print outputs by allowing sub-pixel accuracy, with 1440 twips equaling one inch regardless of display density. In practice, twips are integral to systems like the (WMF) format, where the MM_TWIPS mapping mode defines logical units as twips for drawing operations, and to document standards such as (RTF) and binary files for controlling margins, fonts, and spacing. The adoption of twips originated in the context of early graphical user interfaces and printer technologies, where fine-grained measurements were needed to bridge the gap between screen pixels and high-resolution print media. Today, while modern web standards favor units like pixels or CSS points, twips remain relevant in legacy tools, (VBA), and certain calls for coordinate systems in controls and forms. For example, properties like ScaleMode in VBA can be set to twips to specify units for drawing methods such as Line or , facilitating portable code across different hardware.

Definition

Etymology

The term "twip" is an abbreviation for "twentieth of a point," denoting a unit equivalent to one-twentieth of a typographical point. Microsoft coined the term as a fabricated word to describe this subdivision. The twip relates directly to the point as its foundational measure in typography.

Precise Measurement

A twip is defined as exactly 1/20 of a typographical point, with one point equivalent to 1/72 inch in digital . This results in the precise of 1 twip = \frac{1}{20 \times 72} = \frac{1}{1440} inch. To derive the metric equivalent, note that 1 inch is defined as exactly 25.4 mm. Thus, 1 twip = \frac{25.4}{1440} mm ≈ 0.0176388889 mm, or equivalently 17.64 μm. This fractional relationship to the inch-based point ensures device independence in digital contexts, as it ties the unit to a fixed physical scale that remains consistent regardless of varying screen resolutions or output devices, allowing uniform proportions in layout and rendering.

Relation to Other Units

Typographic Units

In typography, the point (pt) serves as a fundamental absolute unit of measurement, defined as 1/72 of an inch in the Anglo-American system, with 12 points equaling one , a larger unit traditionally used for layout grids and column widths. The twip, derived from "twentieth of a point," functions as a subdivision of this system, where 20 twips constitute one point, providing a finer for precise positioning in and design. This structure allows twips to handle sub-point adjustments that points alone might not accommodate with sufficient accuracy. Unlike relative units such as the , which equals the current font's point size and scales with the height, or the , defined as half an for spacing elements like dashes, the twip maintains an absolute measure independent of font variations. This absolute quality makes twips particularly suited for consistent cross-device or cross-font applications where relative units like and could introduce variability based on the chosen . Twips align with the historical Anglo-American point system, which differs from European scales like the Didot system—where 12 Didot points form one , approximately 0.178 inches—and the slightly larger French ligne-based measurements. For context, one twip equals 1/1440 of an inch, reinforcing its basis in the imperial-derived Anglo-American framework rather than metric-influenced alternatives like the Didot point.

Imperial and Metric Equivalents

The twip is fundamentally tied to the system, where it is defined as exactly 1/1440 of an inch. This makes 1440 twips equivalent to one inch. In relation to other , 20 twips equal one typographical point, which itself measures 1/72 of an inch. For larger scales relevant in contexts such as document layouts spanning multiple feet, one foot comprises 12 inches or 17,280 twips, while one yard equals 36 inches or 51,840 twips. Conversions to the metric system derive from the exact equivalence of one inch to 25.4 millimeters, established internationally in 1959. Thus, one twip measures 25.4 / 1440 millimeters, or approximately 0.01764 millimeters. This equates to about 17.64 micrometers (μm). For broader scale, one meter contains approximately 56,693 twips, calculated as 1,000 millimeters divided by 0.01764 mm per twip. A practical example illustrates these conversions in : a standard sheet, with a width of exactly 210 millimeters per , corresponds to 210 / 0.01764 ≈ 11,905 twips. This value is obtained by first converting 210 mm to inches (8.2677 inches) and then multiplying by 1,440 twips per inch. In computational implementations, approximations like 0.01764 mm per twip can introduce precision loss when using , potentially leading to cumulative errors in rendering or layout calculations. To mitigate this, many applications, including products, store and process measurements as values in twips, leveraging the unit's for exact fractional representation of inches without decimal approximations.

Applications in Computing

Typography and Document Processing

In , all measurements such as margins, line spacing, and font sizing are internally stored and processed in twips to ensure precision across different display and printing environments. For instance, user inputs in inches or centimeters are converted to twips upon entry, with values like a 0.25-inch margin equating to 360 twips for consistent layout calculations. Twip's device-independent nature, defined as 1/1440 of an inch, facilitates accurate scaling in without reliance on specific hardware resolutions. In the (RTF), twips serve as the fundamental unit for platform-independent text exchange, enabling uniform formatting across applications. RTF control words, such as \margl for the left margin, specify positions and dimensions directly in twips; for example, \margl720 sets a left margin of 0.5 inches. This approach ensures that elements like indents and spacing remain consistent when documents are transferred between systems supporting RTF. In applications, particularly those in the ecosystem like Word and Publisher, twips support consistent rendering of typographic features such as , leading, and indents across printers and screens. By using twips for these adjustments, software maintains proportional spacing regardless of , preventing distortions in text . A practical example is font height calculation: a 12-point font equates to 240 twips, which is used to determine and interline spacing in document layouts. This conversion, derived from 1 point equaling 20 twips, allows precise vertical positioning in RTF and Word files.

User Interface Design

In Visual Basic applications, particularly in Visual Basic 6.0 and Microsoft Access forms, twips serve as the default unit for specifying the size and position of graphical user interface elements such as form controls, buttons, and dialog boxes. This approach ensures layout consistency across varying display resolutions by tying measurements to physical dimensions rather than device-specific pixels. For instance, the Width property of a CommandButton control is set in twips, where 1440 twips equate to one inch, allowing developers to define button dimensions that scale appropriately when rendered. Twips promote device independence in Windows-based design by converting to pixels based on the system's (DPI) setting, enabling dynamic scaling for different monitors. At a standard 96 DPI, 1440 twips correspond to 96 pixels, representing one inch on screen; on higher-DPI displays, the same twip value maps to more pixels to maintain proportional sizing. In the Windows (GDI), the MM_TWIPS mapping mode further supports this by defining each logical as one twip (1/1440 inch), facilitating resolution-agnostic positioning of UI components like window coordinates. In legacy software developed with or the , twips enable partial high-DPI awareness by allowing specifications for control widths and dialog layouts that adjust automatically during runtime conversion to pixels. For example, form properties like SubdatasheetHeight or InputBox positioning use twips to define vertical and horizontal extents, helping older applications avoid bitmap stretching on modern high-resolution screens when DPI is enabled. Despite these advantages, twips have limitations in contemporary frameworks, where device-independent pixels (DIPs, defined as 1/96 inch) in CSS for interfaces or English Metric Units (EMUs, with 914400 per inch) in Open XML have largely supplanted them for greater precision and cross-platform compatibility. However, twips persist in formats like the legacy .doc structure for maintaining in UI-related positioning data. RTF files, often embedded in UIs for text rendering, also rely on twips for similar consistency.

History and Adoption

Origins in Microsoft Products

The twip unit emerged in the 1980s as a key component of 's graphics and document handling systems, designed to mitigate inconsistencies in visual rendering across diverse hardware setups, including varying screen resolutions and printer capabilities. It was integrated into the (GDI) with the release of in November 1985, where it underpinned the MM_TWIPS mapping mode to enable precise, device-independent coordinate transformations. Although 1.0 for launched in October 1983, twips gained prominence in word processing through their adoption in the (RTF), first specified in 1987 alongside Word 3.0 for Macintosh. The rationale for selecting the twip—a equal to 1/1440 of an inch—centered on its exceptional divisibility, as 1440 divides evenly into (points per inch) by a factor of 20, facilitating accurate scaling for both digital displays and print outputs without fractional losses. This choice allowed to transcend the limitations of coarser units like points, providing a unified for maintaining proportional integrity in layouts. A pivotal milestone was the twip's embedding in the Windows GDI for defining logical coordinate systems, which abstracted device specifics to support consistent graphics rendering from the platform's inception. Its formal documentation occurred in the RTF specification, published in the March 1987 issue of Microsoft Systems Journal, establishing twips as the standard for encoding measurements in text and graphics interchange across applications. Microsoft's overarching motivation in developing the twip was to foster and independence, enabling seamless output portability in an era of environments and predating widespread high-DPI display challenges.

Use in Other Software

Twips serve as a base unit for drawing and text measurements in , an open-source office suite derived from , enabling precise compatibility with legacy documents during import and export operations. 's API includes functions such as TwipsPerPixelX and TwipsPerPixelY to convert between pixels and twips, ensuring consistent rendering across display systems. This internal use of twips facilitates the handling of .doc files, where measurements like margins and font sizes are stored in twips, allowing seamless support for binary Word formats without proprietary dependencies. Adobe products, including and legacy versions of InDesign, provide partial support for twips through compatibility with RTF and older Word formats, primarily to enable import of formatted documents from ecosystems. While Adobe prefers units like points or English Metric Units (EMUs) in its native workflows, twips are parsed during RTF processing to maintain layout fidelity in cross-application exchanges. This limited integration ensures for users migrating content from Word but does not extend to full native adoption in modern Adobe tools. The (RTF), an open specification originally developed by but widely adopted beyond its ecosystem, relies on twips for all measurements, including margins, indents, and line spacing, making it a key vector for twip usage in non-proprietary contexts. RTF's has led to its implementation in diverse applications, such as on Windows and various third-party word processors like those in the or older suites, as well as clients supporting formatted text exchange. The binary .doc format specifications, now publicly documented, also specify twips for structural elements, influencing parsers in open-source tools that handle legacy files. As of 2025, twips face trends in contemporary , with modern standards like CSS favoring relative units such as pixels, , and rems for and cross-platform , reducing reliance on fixed typographic measures. However, twips persist in codebases, parsers, and layers for handling pre-ODF and pre-DOCX documents, particularly in enterprise environments maintaining older document workflows. This retention underscores twips' role in ensuring archival accuracy amid ongoing migrations to open formats.

References

  1. [1]
    [MS-DOC]: Glossary - Microsoft Learn
    Aug 1, 2023 · twip: A unit of measurement that is used in typesetting and desktop publishing. It equals one-twentieth of a printer's point, or 1/1440 of ...
  2. [2]
    [MS-WMF]: MapMode Enumeration - Microsoft Learn
    Apr 23, 2024 · In printing, a point is 1/72 of an inch; therefore, 1/20 of a point is 1/1440 of an inch. This unit is also known as a "twip". Positive x is to ...
  3. [3]
    Twip Definition & Meaning - YourDictionary
    Origin of Twip ... Abbreviation of twentieth of a point (referring to a printer's point). From Wiktionary. Find Similar Words.Missing: etymology | Show results with:etymology
  4. [4]
    ScaleMode Property [Access 2003 VBA Language Reference]
    Oct 16, 2006 · You can use the ScaleMode property in Visual Basic to specify the unit of measurement for coordinates on a page when the Circle, Line, Pset, or Print method is ...
  5. [5]
  6. [6]
    The GDI Mapping Mode - TU Chemnitz
    "Twip" is a fabricated word meaning "twentieth of a point." I mentioned earlier that a point is a unit of measurement in typography that is approximately 1 ...
  7. [7]
    [PDF] Microsoft Office Word 97-2007 Binary File Format (.doc) Specification
    one-twentieth of a point size (1/20 * 1/72‖) is called a twip in this documentation. (e.g. xaPage is the width of a page). ya. Used to name a variable that ...Missing: invention | Show results with:invention
  8. [8]
    VBE Glossary | Microsoft Learn
    Feb 7, 2022 · A unit of screen measurement equal to 1/20 point. A twip is a screen-independent unit used to ensure that placement and proportion of screen ...Missing: exact | Show results with:exact
  9. [9]
  10. [10]
    [MS-OI29500]: bounds (Bounds) | Microsoft Learn
    Oct 15, 2020 · A twip is equivalent to 1/1440th of an inch (or one-twentieth of a point). Expand table. Parent Elements. downRevStg (§3.1 ...
  11. [11]
    Coordinate System - TX Text Control Documentation
    Twip is a fabricated word meaning twentieth of a point. A point which is a unit of measurement for type, is approximately 1/72 inch but often assumed in ...Missing: exact | Show results with:exact
  12. [12]
    [MS-ODRAW]: Glossary - Microsoft Learn
    May 17, 2022 · English Metric Unit (EMU): A measurement in computer typography. There are 635 EMUs per twip, 6,350 EMUs per half-point, 12,700 EMUs per point, ...
  13. [13]
    Em – Fonts Knowledge - Google Fonts
    A unit of measurement, 1em is equal to the size of a font. Adjusting font size will resize glyphs relative to the em square.
  14. [14]
    [PDF] Typographic Terms - Adobe
    The en is typi- cally half the width of the point size. It is half the width of an em space. En dash A dash the length of an en is used to.
  15. [15]
    The Trouble With EM 'n EN (and Other Shady Characters)
    An “em” is a unit of measurement defined as the point size of the font—12 point type uses a 12 point “em.” An “en” is one-half of an “em.” Though some of ...
  16. [16]
    Point System - PrintWiki
    Used primarily in Europe, the Didot system uses the cicero as its basic unit, which is equal to 12 corps, or 0.178 inch. The Didot corps (or Didot point) ...Missing: Anglo- | Show results with:Anglo-
  17. [17]
    Application.TwipsToPoints method (Publisher) - Microsoft Learn
    Sep 12, 2021 · In this article​​ Converts a measurement from twips to points (20 twips = 1 point). Returns the converted measurement as a Single.
  18. [18]
    Convert twip to inch [in] • Typography and Digital Imaging Units ...
    A twip (abbreviated from "twentieth of a point") is a typographical unit of measurement, defined as 1/20 of a typographical point. One twip is 1/1440 inch ...
  19. [19]
    Convert inches to mm
    An inch was defined to be equivalent to exactly 25.4 millimeters in 1959. There are 12 inches in a foot and 36 inches in a yard.
  20. [20]
    Convert twip to mm - Conversion of Measurement Units
    Do a quick conversion: 1 twip = 0.017639 millimetres using the online calculator for metric conversions. Check the chart for more details.Missing: Microsoft | Show results with:Microsoft
  21. [21]
    International paper sizes. The ISO 216 A, B, C-standard. - A4-size
    The ISO 216 standard divides paper sizes into A, B, and C series. A4 is 210 x 297 mm, and A0 is 841 x 1,189 mm. A4 has a surface area of 1/16 m².
  22. [22]
    What are the various units of measurement used in programming?
    Mar 2, 2009 · TWIPS. A twip (derived from TWentieth of an Imperial Point) is a typographical measurement, defined as 1/20 of a typographical point. One twip ...
  23. [23]
    Why does Word convert measurements in integer to slightly different ...
    Aug 22, 2024 · Any measurement you enter in any units is converted to the equivalent number of twips -- and that is stored as an integer number with no decimal ...
  24. [24]
    [PDF] Rich Text Format RTF Syntax
    These control words are listed in the table that follows. Some measurements in this table are in twips; a twip is one-twentieth of a printer's point. The ...
  25. [25]
    [PDF] Page Margin Checking Macro for RTF Files - Lexjansen.com
    A twip is 1,440th of an inch. Inversely, one-inch equals. 1440 twips. The "\margl720" means that the left margin has 720 twips, which is 0.5 inches ( ...
  26. [26]
    [PDF] Rich-Text Format Specification v. 1.2 - LaTeX2RTF
    These control words are described in the following table (some measurements in this table are in twips; a twip is one-twentieth of a point):. Control word.
  27. [27]
    [MS-OE376]: Part 4 Section 7.1.3.16, ST_TwipsMeasure (Twips ...
    The standard allows any unsigned 32-bit integer. Word only allows values up to 31,680.Missing: precision | Show results with:precision
  28. [28]
    Typography Converter - CalcKit
    Feb 7, 2024 · Twip (twip): Twip is a unit of measurement equal to 1/20th of a point, commonly used in desktop publishing applications. Conversion Factor: 1 ...
  29. [29]
    CommandButton.Width property (Access) - Microsoft Learn
    Sep 13, 2021 · The following code resizes a command button to a 1-inch by 1-inch square button (the default unit of measurement in Visual Basic is twips; 1440 ...
  30. [30]
    Support.TwipsPerPixelX Method - Microsoft Learn
    In Visual Basic 6.0, coordinates were expressed in twips; in Visual Basic they are expressed in pixels. This function is used by the upgrade tools.
  31. [31]
    SetMapMode function (wingdi.h) - Win32 apps | Microsoft Learn
    Oct 12, 2021 · Each logical unit is mapped to one twentieth of a printer's point (1/1440 inch, also called a twip). Positive x is to the right; positive y is ...
  32. [32]
    Interaction.InputBox(String, String, String, Int32, Int32) Method
    Numeric expression that specifies, in twips, the distance of the upper edge of the dialog box from the top of the screen. If you omit YPos , the dialog box ...
  33. [33]
    Points, inches and Emus: Measuring units in Office Open XML
    Jan 4, 2010 · The EMU is a virtual unit to bridge both centimeters and inches. One inch equates to 914400 EMUs and a centimeter is 360000.
  34. [34]
    Mapping Modes and Translations - Win32 apps | Microsoft Learn
    Jan 7, 2021 · MM_TWIPS, Each unit in page space is mapped to one twentieth of a printer's point (1/1440 inch). The value of x increases from left to right ...
  35. [35]
    Rich Text Format (RTF) Family - The Library of Congress
    In 1992, Microsoft published version 1.0 of the RTF specification, the first of many 1.x versions introduced to handle new features of Microsoft applications, ...Missing: twip | Show results with:twip
  36. [36]
    [MS-WMF]: Glossary - Microsoft Learn
    Jun 24, 2021 · twip: A unit of measurement that is used in typesetting and desktop publishing. It equals one-twentieth of a printer's point, or 1/1440 of an ...
  37. [37]
    Rich Text Format (RTF) Version 1.5 Specification - Biblioscape
    These control words are described in the following table. Some measurements in this table are in twips; a twip is one-twentieth of a point. Control Word ...Missing: invention | Show results with:invention
  38. [38]
    LibreOffice Basic Glossary
    Twips. A twip is a screen-independent unit which is used to define the uniform position and size of screen elements on all display systems. A twip is 1 ...
  39. [39]
    About Converting Microsoft Office Documents - LibreOffice Help
    The most recent versions of LibreOffice can load and save the Microsoft Office Open XML document formats with the extensions docx, xlsx, and pptx. The same ...
  40. [40]
    RTF files: What is rich text format? | Adobe Acrobat
    Is RTF still supported? Yes. While it's considered more outdated than newer options like DOCX files, most text editors and word processors still support RTF ...Missing: twip unit
  41. [41]
    RTF overview and quick reference - Ubuntu Manpage
    Measurements in RTF are generally in twips. A twip is a twentieth of a point, i.e., a 1440th of an inch.
  42. [42]
  43. [43]
    Change RTF image storage format? - English - Ask LibreOffice
    Jan 24, 2024 · The RTF is a very old, never standardized, abandoned file format. Do not use it. It has many-many versions and sub-versions even with ...Missing: non- | Show results with:non-
  44. [44]
    Friday 24 October, 2025 - The Document Foundation Planet
    master – PPT Master Unit (1/576 in). px – Pixel unit (15 twip, 96 ppi). ch – Char unit (210 twip, 14 px). line – Line unit (312 twip). Handling Overflows. If ...