Re: [SPAM: 3.000] Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-06-04 Thread Greg Ewing
Weeble wrote: To get the very best positioning of a text cursor, I think you want to calculate the width of the string on its left, then *subtract* the overhang of the character immediately to the left, if any. For the *very* best results with italic fonts, you really need a slanted cursor. :-

Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-06-02 Thread Weeble
I've looked into Sam's monospaced font size problems and followed up in the Ubuntu bug. I think we've discovered unusual behaviour in FreeType that may or may not be a bug, and hopefully someone on the FreeType mailing list will respond to my questions over there. I'm posting back here now to discu

Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-05-28 Thread Sam Bull
On Mon, 2012-05-28 at 17:08 +0100, Weeble wrote: > 1. I could reproduce the behaviour you saw on Windows but not a Ubuntu > VM (but it is old, certainly not 12.04). I worked out that it is only one version of the font that is causing the problem. So, if you want to test it on Ubuntu without updati

Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-05-28 Thread Weeble
On Mon, May 28, 2012 at 12:27 PM, Sam Bull wrote: > OK, so I registered a bug on this, and it's possible that it is a bug > with the rendering library. Can anybody who knows anything about the > pygame.font module, look at the bug report and see if you can add any > information to this? > > https:

Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-05-28 Thread Sam Bull
OK, so I registered a bug on this, and it's possible that it is a bug with the rendering library. Can anybody who knows anything about the pygame.font module, look at the bug report and see if you can add any information to this? https://bugs.launchpad.net/ubuntu/+source/ttf-freefont/+bug/1001033

Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-05-14 Thread James Paige
> I've given up on using SysFont because the results are > too unpredictable cross-platform. I always bundle my > own fonts with my games and use Font to load them > explicitly. YES! This, this, a thousand times THIS! --- James paige

Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-05-14 Thread Greg Ewing
Nicholas Seward wrote: The letters may be different lengths. However, the letters should be spaced equally. For example,"i" will be shorter than "w" but "hit" and "hot" should be the same length. No, that's not the way it should work. I just tried an experiment: >>> f = Font("VeraMono.ttf",

Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-05-14 Thread Dan Uznanski
Are you accounting correctly for non-integer character width? If it's always the same letter /position/ that's giving you trouble, then it's possible that the width of the character is not an integer in that size, and your text renderer may be accounting for that in ways that your own program is n

Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-05-14 Thread Nicholas Seward
The letters may be different lengths. However, the letters should be spaced equally. For example,"i" will be shorter than "w" but "hit" and "hot" should be the same length. On Mon, May 14, 2012 at 5:25 AM, Sam Bull wrote: > Before I go and file a bug against Ubuntu, can somebody confirm I'm not

[pygame] Monospaced fonts are meant to be mono-spaced, right?

2012-05-14 Thread Sam Bull
Before I go and file a bug against Ubuntu, can somebody confirm I'm not being stupid. For my input boxes, the cursor position depends on a monospaced font. This means I check the length of a rendered letter ("e") using the font, and then set the cursor position as a multiple of this length. This