Re: Make characters same width in textview
Re: Make characters same width in textview
- Subject: Re: Make characters same width in textview
- From: Michael Gersten <email@hidden>
- Date: Mon, 01 Apr 2002 11:25:33 -0800
Ok, here's a different question on same-width fonts:
Most fixed-width fonts aren't as pretty as variable width fonts.
I'd like to know if there's an easy way (ok, I know there's no easy way, but how about any way) to say "I want to use font x, and I want the characters centered on the middle of the n-sized cell".
If you've used some terminal programs that let you select arbitrary fonts, you've probably noticed that they usually use w-sized, or m-sized (whichever is larger) cells, and they left-edge the letters, instead of centering the letters (ruins thin letters like 'i' and 'l')
In other words, I'd like to have a window that is 80x25 (or whatever) times the size of the space needed for the 'n', plus a little more on the edge; I'd like to consider that I can put any character at the middle of one of those cells; if I have adjacent 'w' or 'm', then I'll get a little overlap.
Can this be done? Is this too much of a wish that only I would possibly want?
Matt Judy wrote:
>
>
Depending on your presentation needs, if you need something a bit more
>
visually appealing (yet less readable at very small sizes), you can also
>
use Andale Mono.
>
>
--Matt Judy
>
>
Millennium wrote:
>
> Exactly. Monospaced fonts are considered the way to do this. Courier and
>
> Monaco come with all Macs, and should fit your needs well (Courier has
>
> serifs, Monaco does not).
>
>
>
> It's just a matter of setting the TextView's font to Courier or Monaco;
>
> whichever you feel is appropriate. For readability concerns, you should
>
> probably display Monaco but print Courier.
>
>
>
>
>
>>Why don't you just use a fixed width font as the font for the text view?
>
>>
>
>>Eric
>
>>
>
>>On Saturday, March 16, 2002, at 01:51 PM, email@hidden wrote:
>
>>
>
>>
>
>>>I am setting the string of a NSTextView and I would like the characters
>
>>>to all be the same width. I am creating a table from a database query
>
>>>and of course things lining up correctly is of upmost importance.
>
>>>Eventually, I will be using table view but I wanted to get this working
>
>>>first. Nothing looked like what I was looking for in the docs but then
>
>>>again I don't know the term for "having characters of the same width".
>
>>>Perhaps someone could point me in the right direction or provide sample
>
>>>code for this?
>
>>
>
> _______________________________________________
>
> cocoa-dev mailing list | email@hidden
>
> Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
> Do not post admin requests to the list. They will be ignored.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.