[visionegg] Re: text rendering
- From: "Gabriel Nevarez" <nevarezg@xxxxxxxxxxxxx>
- To: <visionegg@xxxxxxxxxxxxx>
- Date: Thu, 03 Mar 2005 00:23:18 +0000
Hi, Andrew,
Figured out most of it. Seems you need to have the appropriate font file in the
script directory (but this may be platform-dependent).
My only remaining question is this: I am still somewhat confused about exact
text placement. Having created a font with the following properties,
text = Text(text="Hello world!",
color=(1.0,1.0,1.0), # alpha is ignored (set with max_alpha_param)
position=(0,0),
font_size=30,
font_name = "cour.ttf",
anchor='left')
displays the text "Hello World!" flushed to the left, but not also flushed to
the bottom-left corner. In other words, the horizontal placement seems to be
correct (left-most corner), but the vertical seems screwed up, in that half the
text is _below_ the 0-pixel vertical boundary.
Can I safely assume that selecting anchor='left' selects the leftmost point on
the string as the starting X coordinate, but also chooses font-height/2 as the
starting Y coordinate, instead of the bottom-most point in the characters
string?
Minor points, but essential for many visual word-based studies.
cheers,
gabe
>>> nevarezg@xxxxxxxx 02/03/05 10:13 PM >>>
Hi, Andrew,
A new study we're preparing requires fairly tight constraints on text
placement and parameters. So far as I can tell, the Text module
provides simple parameter modifications, but I'm having trouble doing
even simple things like changing fonts. In addition, it would be
beneficial be able to incorporate pygame-level text control into
VisionEgg, particularly in regards to exact character placement in
text displays.
Do you have any suggestions on proceeding with text-based displays
using the Text module? Things such as:
- Enumerating and changing fonts.
- Determining what text functions can be performed at the pygame
level and which at the VisionEgg level.
cheers,
-=Gabriel Nevarez
Research Programmer
Psychology Department
Cardiff University
http://www.cf.ac.uk/psych
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- Follow-Ups:
- [visionegg] Re: text rendering
- From: Andrew Straw
Other related posts:
- » [visionegg] text rendering
- » [visionegg] Re: text rendering
- » [visionegg] Re: text rendering
- [visionegg] Re: text rendering
- From: Andrew Straw