字符比Java中的空格小?

时间:2021-09-04 20:12:32

I'm making a program in Java and I need a character that is like the space (" "), except smaller in length when it is displayed. Ideally the character would be half the size of the space character.

我正在用Java创建一个程序,我需要一个类似于空格(“”)的字符,除了显示它的长度更小。理想情况下,角色的大小是空间角色的一半。

I was wondering if such a character exists, or if there is a way for me to modify the length of the space character to make it smaller when outputted to the user.

我想知道这样的角色是否存在,或者是否有办法让我修改空格字符的长度以使其在输出给用户时变小。

1 个解决方案

#1


2  

Read this article. This may help:

阅读这篇文章。这可能有所帮助:

U+0020  SPACE   foo bar Depends on font, typically 1/4 em, often adjusted
U+00A0  NO-BREAK SPACE  foo bar As a space, but often not adjusted
U+1680  OGHAM SPACE MARK    foo bar Unspecified; usually not really a space but a dash
U+180E  *N VOWEL SEPARATOR   foo᠎bar No width
U+2000  EN QUAD foo bar 1 en (= 1/2 em)
U+2001  EM QUAD foo bar 1 em (nominally, the height of the font)
U+2002  EN SPACE    foo bar 1 en (= 1/2 em)
U+2003  EM SPACE    foo bar 1 em
U+2004  THREE-PER-EM SPACE  foo bar 1/3 em
U+2005  FOUR-PER-EM SPACE   foo bar 1/4 em
U+2006  SIX-PER-EM SPACE    foo bar 1/6 em

#1


2  

Read this article. This may help:

阅读这篇文章。这可能有所帮助:

U+0020  SPACE   foo bar Depends on font, typically 1/4 em, often adjusted
U+00A0  NO-BREAK SPACE  foo bar As a space, but often not adjusted
U+1680  OGHAM SPACE MARK    foo bar Unspecified; usually not really a space but a dash
U+180E  *N VOWEL SEPARATOR   foo᠎bar No width
U+2000  EN QUAD foo bar 1 en (= 1/2 em)
U+2001  EM QUAD foo bar 1 em (nominally, the height of the font)
U+2002  EN SPACE    foo bar 1 en (= 1/2 em)
U+2003  EM SPACE    foo bar 1 em
U+2004  THREE-PER-EM SPACE  foo bar 1/3 em
U+2005  FOUR-PER-EM SPACE   foo bar 1/4 em
U+2006  SIX-PER-EM SPACE    foo bar 1/6 em