Share to: share facebook share twitter share wa share telegram print page

 

Duospaced font

Visual comparison of a duospaced CJK font (Migu 2M) versus a monospaced font (Consolas).

A duospaced font (also called a duospace font) is a fixed-width font whose letters and characters occupy either of two integer multiples of a specified, fixed horizontal space. Traditionally, this means either a single or double character width,[1] although the term has also been applied to fonts using fixed character widths with another simple ratio between them.[2]

These dual character widths are also referred to as half-width and full-width, where a full-width character occupies double the width of a half-width character. This contrasts with variable-width fonts, where the letters and spacings have more than two different widths. And, unlike monospaced fonts, this means a character can occupy up to two effective character widths instead of a single character width. This extra horizontal space allows for the accommodation of wider glyphs, such as large ideographs, that cannot reasonably fit into the single character width of strictly uniform, monospaced font.

In CJK typography

The idea of a "duospaced" font came from East Asian typography, where the local scripts of CJK characters simply cannot fit into a narrow column used in Latin fixed-pitch fonts.[1] Note that this "duospace" name is mostly a historical (c. 1990) Western distinction; Asian typefaces with such characteristics simply call themselves "monospaced" or "fixed-pitch".[3]

CJK monospace fonts typically include halfwidth and fullwidth forms of characters that provide different widths for typesetting. In addition to East Asian characters and such forms, it is common for other technical and pictographic symbols to become duospaced in some East Asian fonts, a phenomenon known as "ambiguous width".[3]

It is a common pitfall for Western programmers to neglect support for such fonts:

  • Terminal applications may have misaligned output due to assuming all character "pitch" to be 1 column wide. The wcwidth() function, originally part of POSIX, is available for querying the width of characters.[4]
  • Qt has a bug where it fails to list CJK monospaced fonts because the underlying fontconfig defined "monospace" as "fixed-pitch" fonts.[5]

With the exception of some Japanese monospace fonts like Source Han Code JP, where a 1.5× width is used as the ideograph width,[6] almost all CJK monospace fonts use 2× as the ideograph width.[3] (In the case of the Korean language, Hangul characters which are usually slightly narrower than the ideographs are made to match them.)

Some CJK monospace fonts with two or more widths are:

In Western typography

Western duospaced fonts are similar in purpose to CJK duospaced fonts, but they are much rarer and less supported. The idea seems to be limited to an iA Writer typeface where the latin characters wmWM have 1.5× widths, so that they retain the traditional letter shape better.[2]

See also

Notes

  1. ^ a b c Officially a "monospaced font".

References

  1. ^ a b "Font spacing characteristics". IBM Knowledge Center. IBM Corporation. 1990. Retrieved 2017-09-17.
  2. ^ a b Abhimanyu Ghoshal. "iA Writer's 'Duospace' Font: A Better Flow While Retaining The Benefits Of 'Monospace'". The Next Web.
  3. ^ a b c "UAX #11: East Asian Width". unicode.org. For a fixed pitch font, this width translates to a display width of either one half or a whole unit width. [...] Some characters behave differently in East Asian context than in non-East Asian content. Their default width property is considered ambiguous and needs to be resolved into an actual width property based on context.
  4. ^ "Offering a solution for Terminal Wide Character issues · Articles". jeffquast.com.
  5. ^ "Rethinking the spacing detection: Dual Width => Multiple width (#176) · Issues · fontconfig / fontconfig". GitLab.
  6. ^ Hattori, Masataka (2015-06-11). "Introducing Source Han Code JP". CJK Type Blog. Ken Lunde / Adobe.
  7. ^ "Predefined Fonts". Oracle. Retrieved 2017-09-17.
  8. ^ a b "TrueType and OpenType fonts". IBM Knowledge Center. IBM Corporation. Retrieved 2017-09-17.
  9. ^ a b "Summary tables for WorldType fonts". IBM Knowledge Center. IBM Corporation. Retrieved 2017-09-17.
  10. ^ Hattori, Masataka (2015-06-11). "Introducing Source Han Code JP". CJK Type Blog. Ken Lunde / Adobe.
Kembali kehalaman sebelumnya