Jump to content

Duospaced font: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Added "ↈ"
CJKVR (talk | contribs)
m In CJK typography: insert links
 
(22 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Short description|Font with glyphs of two different fixed widths}}
[[File:Comparison of duospaced vs. monospaced font.svg|thumb|upright=1.5|Visual comparison of a duospaced font (Migu 2M) versus a monospaced font ([[Consolas]]).]]
[[File:Comparison of duospaced vs. monospaced font.svg|thumb|upright=1.5|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.<ref>{{cite web |url=https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.e0zx100/e0z2o00_fontspacing.htm |title=Font spacing characteristics |date=1990 |website=IBM Knowledge Center |publisher=IBM Corporation |access-date=2017-09-17 }}</ref> although the term has also been applied to fonts using fixed character widths with another simple ratio between them.<ref name="tnw">{{cite web|title=iA Writer's 'Duospace' Font: A Better Flow While Retaining The Benefits Of 'Monospace'|url=https://thenextweb.com/dd/2017/11/24/ia-writers-new-duospaced-font-is-great-for-drafts-and-its-free/|publisher=[[The Next Web]]|author=Abhimanyu Ghoshal}}</ref>
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,<ref name=ibm>{{cite web |url=https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.e0zx100/e0z2o00_fontspacing.htm |title=Font spacing characteristics |date=1990 |website=IBM Knowledge Center |publisher=IBM Corporation |access-date=2017-09-17 }}</ref> although the term has also been applied to fonts using fixed character widths with another simple ratio between them.<ref name="tnw">{{cite web|title=iA Writer's 'Duospace' Font: A Better Flow While Retaining The Benefits Of 'Monospace'|url=https://thenextweb.com/dd/2017/11/24/ia-writers-new-duospaced-font-is-great-for-drafts-and-its-free/|publisher=[[The Next Web]]|author=Abhimanyu Ghoshal}}</ref>


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 [[Typeface#Proportion|variable-width fonts]], where the letters and spacings have more than two different widths. And, unlike [[monospaced font]]s, 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.
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 [[Typeface#Proportion|variable-width fonts]], where the letters and spacings have more than two different widths. And, unlike [[monospaced font]]s, 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 ==
Although associated with Asian character sets and [[halfwidth and fullwidth forms]], the general notion of duospaced fonts is not limited to such characters. Examples of duospaced characters not strictly associated with Asian halfwidth and fullwidth forms include various [[Miscellaneous Technical|technical]] and [[Miscellaneous Symbols and Pictographs|pictographic]] symbols as seen in Migu 2M, and the Unicode character [[Numerals in Unicode#Roman numerals|Roman Numeral One Hundred Thousand]] (U+2188: ↈ) and various other symbols in [[GNU Unifont]].
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 [[Monospaced font|fixed-pitch fonts]].<ref name=ibm/> 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".<ref name=EAW/>


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 [[Miscellaneous Technical|technical]] and [[Miscellaneous Symbols and Pictographs|pictographic]] symbols to become ''duospaced'' in some East Asian fonts, a phenomenon known as "ambiguous width".<ref name=EAW>{{cite web |title=UAX #11: East Asian Width |url=http://unicode.org/reports/tr11/tr11-8.html |website=unicode.org |quote=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.}}</ref>
== Example font families ==

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 {{code|wcwidth()}} function, originally part of [[POSIX]], is available for querying the width of characters.<ref>{{cite web |title=Offering a solution for Terminal Wide Character issues · Articles |url=https://jeffquast.com/post/terminal_wcwidth_solution/ |website=jeffquast.com}}</ref>
* [[Qt (software)|Qt]] has a bug where it fails to list CJK monospaced fonts because the underlying [[fontconfig]] defined "monospace" as "fixed-pitch" fonts.<ref>{{cite web |title=Rethinking the spacing detection: Dual Width => Multiple width (#176) · Issues · fontconfig / fontconfig |url=https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/176 |website=GitLab |language=en}}</ref>

With the exception of some Japanese monospace fonts like [[Source Han Code JP]], where a 1.5× width is used as the [[Ideogram|ideograph]] width,<ref>{{cite web |url=https://blogs.adobe.com/CCJKType/2015/06/source-han-code-jp.html |title=Introducing Source Han Code JP |last=Hattori |first=Masataka |date=2015-06-11 |work=CJK Type Blog |publisher=[[Ken Lunde]] / [[Adobe, Inc.|Adobe]]}}</ref> almost all CJK monospace fonts use 2× as the ideograph width.<ref name=EAW/> (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:
* Andale Duospace WT<ref name="Oracle_PredefinedFonts">{{cite web |url=https://docs.oracle.com/middleware/12212/bip/BIPAD/GUID-592927F3-11D3-4E5D-A472-86D48843BF25.htm#BIPAD475 |title=Predefined Fonts |publisher=Oracle |access-date=2017-09-17 }}</ref>
* Andale Duospace WT<ref name="Oracle_PredefinedFonts">{{cite web |url=https://docs.oracle.com/middleware/12212/bip/BIPAD/GUID-592927F3-11D3-4E5D-A472-86D48843BF25.htm#BIPAD475 |title=Predefined Fonts |publisher=Oracle |access-date=2017-09-17 }}</ref>
* [[GNU Unifont]]
* [[GNU Unifont]] (pan-character set)
* Migu 1M, Migu 2M{{efn|name=cjk-mono|Officially a "monospaced font".}}
* Migu 1M
* Migu 2M
* Monotype Sans Duospace WT<ref name="IBM_TT_OT_Fonts">{{cite web |url=https://www.ibm.com/support/knowledgecenter/en/ssw_i5_54/rzalu/rzalucontruetype.htm |title=TrueType and OpenType fonts | website=IBM Knowledge Center |publisher=IBM Corporation |access-date=2017-09-17 }}</ref>
* Monotype Sans Duospace WT<ref name="IBM_TT_OT_Fonts">{{cite web |url=https://www.ibm.com/support/knowledgecenter/en/ssw_i5_54/rzalu/rzalucontruetype.htm |title=TrueType and OpenType fonts | website=IBM Knowledge Center |publisher=IBM Corporation |access-date=2017-09-17 }}</ref>
* Thorndale Duospace WT<ref name="IBM_TT_OT_Fonts" />
* Thorndale Duospace WT<ref name="IBM_TT_OT_Fonts" />
* WorldType Sans Duo<ref name="IBM_SummaryTablesWorldTypeFonts">{{cite web|url=https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.e0zx100/e0z2o00_zos_worldtype_fonts_naming.htm |title=Summary tables for WorldType fonts | website=IBM Knowledge Center |publisher=IBM Corporation |access-date=2017-09-17 }}</ref>
* WorldType Sans Duo,<ref name="IBM_SummaryTablesWorldTypeFonts">{{cite web|url=https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.e0zx100/e0z2o00_zos_worldtype_fonts_naming.htm |title=Summary tables for WorldType fonts | website=IBM Knowledge Center |publisher=IBM Corporation |access-date=2017-09-17 }}</ref> WorldType Serif Duo<ref name="IBM_SummaryTablesWorldTypeFonts" />
* [[Source Han Sans#Source Han Code JP (2015)|Source Han Code JP]] (1.5×)<ref>{{cite web |url=https://blogs.adobe.com/CCJKType/2015/06/source-han-code-jp.html |title=Introducing Source Han Code JP |last=Hattori |first=Masataka |date=2015-06-11 |work=CJK Type Blog |publisher=[[Ken Lunde]] / [[Adobe, Inc.|Adobe]]}}</ref>{{efn|name=cjk-mono}}
* WorldType Serif Duo<ref name="IBM_SummaryTablesWorldTypeFonts" />
* [[WenQuanYi]] Micro Hei Mono, [[WenQuanYi]] Zen Hei Mono{{efn|name=cjk-mono}}
* [[Source Han Sans#Source Han Code JP (2015)|Source Han Code JP]] (for [[Japanese language|Japanese]], halfwidth size two thirds of fullwidth size)<ref>{{cite web |url=https://blogs.adobe.com/CCJKType/2015/06/source-han-code-jp.html |title=

Introducing Source Han Code JP |last=Hattori |first=Masataka |date=2015-06-11 |work=CJK Type Blog |publisher=[[Ken Lunde]] / [[Adobe, Inc.|Adobe]]}}</ref>
== In Western typography ==
* iA Writer Duospace (for [[English language|English]], fullwidth size used for ASCII M and W, halfwidth size two thirds of fullwidth size)<ref name="tnw" />
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 {{code|wmWM}} have 1.5× widths, so that they retain the traditional letter shape better.<ref name="tnw"/>


== See also ==
== See also ==
Line 23: Line 33:
* [[Halfwidth and fullwidth forms]]
* [[Halfwidth and fullwidth forms]]
* [[Half-width kana]]
* [[Half-width kana]]

== Notes ==
{{notelist}}


== References ==
== References ==

Latest revision as of 19:01, 11 September 2024

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

[edit]

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

[edit]

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

[edit]

Notes

[edit]
  1. ^ a b c Officially a "monospaced font".

References

[edit]
  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.