🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #7860

Re: Monospaced and Higher Unicode Characters

#7860
From: John McGrath TeamB
Date: Sat, 02 Dec 2000 00:00
30 lines
1756 bytes
On Fri, 1 Dec 2000 07:23:08 -0600, James A. Schulz wrote:

> I am assuming that "M" is the same width as all the other
> characters in the "Monospaced" font, otherwise what does
> "Monospaced" mean?

Sorry -- I did not notice that you were using the "Monospaced" font, so 
I did not realize you were assuming that all glyphs in the font were 
the same width.  As Rich points out, "Monospaced" is just a name, and 
that assumption does not always hold.

From what I have seen, the "View" classes in the javax.swing.text 
package are responsible for the actual text layout in text components, 
so I presume that you could enforce a uniform character cell using 
these classes.  But I am not very familiar with them, so I cannot begin 
to say how to implement it.

I suspect that it would take a significant amount of time to figure out 
how they work, and once you understood that, it would not take much to 
enforce a fixed character width in a JTextComponent.  But this is just 
a guess.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.14927e3ce7c6838a989d88@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <906d8v$cq63@bornews.inprise.com> <MPG.14912621d190d0f989d82@forums.borland.com> <9088jr$apb4@bornews.inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,e7b0355fee419750
X-Google-Attributes: gid111d45,public
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Subject: Re: Monospaced and Higher Unicode Characters
Date: 2000/12/02
Message-ID: <MPG.14927e3ce7c6838a989d88@forums.borland.com>
X-Deja-AN: 700227202
References: <906d8v$cq63@bornews.inprise.com> <MPG.14912621d190d0f989d82@forums.borland.com> <9088jr$apb4@bornews.inprise.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing