Discussion:
font styles missing
gabor papp
2011-05-21 16:57:41 UTC
Permalink
hi all,

i updated my shoebot installation to the gitourious one
(https://gitorious.org/shoebot/shoebot) and found that font styles are
not working anymore.

it seems that the code parts which are responsible for this in
typography.py are missing, although in the old repository it's there.
(https://code.goto10.org/hg/index.cgi/shoebot/file/2c9696d6e76a/shoebot/data/typography.py)

are there any reason for this? doesn't gitorious hold the latest version
of the code?

best,
gabor
Sebastian Oliva
2011-05-21 18:44:26 UTC
Permalink
Post by gabor papp
hi all,
i updated my shoebot installation to the gitourious one
(https://gitorious.org/shoebot/shoebot) and found that font styles are not
working anymore.
it seems that the code parts which are responsible for this in typography.py
are missing, although in the old repository it's there.
(https://code.goto10.org/hg/index.cgi/shoebot/file/2c9696d6e76a/shoebot/data/typography.py)
are there any reason for this? doesn't gitorious hold the latest version of
the code?
best,
gabor
What do you mean by "font styles"?

For example, you can use and specify the full name of the font, for
example font('Arial Italic Bold') or font("Univers 66 Bold Italic")
gabor papp
2011-05-21 19:10:10 UTC
Permalink
Post by Sebastian Oliva
What do you mean by "font styles"?
For example, you can use and specify the full name of the font, for
example font('Arial Italic Bold') or font("Univers 66 Bold Italic")
thanks for your help. i meant italic, bold, etc.. i tried your example
and it sometimes work, but not always. i can use font('Arial Bold'), but
not font('Arial Italic'). when using the modifications of the linked
source code from a previous shoebot version these styles could be passed
to text with the 'style' keyword and it set the pango font style, which
worked perfectly.

font("Arial", 25)
text("normal text", 10, 100)
text("italic text", 10, 200, style = 'italic')

best,
gabor
Sebastian Oliva
2011-05-21 21:26:18 UTC
Permalink
Post by gabor papp
Post by Sebastian Oliva
What do you mean by "font styles"?
For example, you can use and specify the full name of the font, for
example font('Arial Italic Bold') or font("Univers 66 Bold Italic")
thanks for your help. i meant italic, bold, etc.. i tried your example
and it sometimes work, but not always. i can use font('Arial Bold'), but
not font('Arial Italic'). when using the modifications of the linked
source code from a previous shoebot version these styles could be passed
to text with the 'style' keyword and it set the pango font style, which
worked perfectly.
font("Arial", 25)
text("normal text", 10, 100)
text("italic text", 10, 200, style = 'italic')
best,
gabor
You need to use the full name of the font, font("Arial Italic") works
good for me, please verify, as Ubuntu does not have the true Arial
fonts, instead it bundles a set of different fonts aliased to them.

I disabled the style and the "manual parser" of the font options in
favour of a Pango solution, as it failed in lots of cases. If you
want, please publish your modifications or send a patch and I'll
review them for merger into the trunk.
gabor papp
2011-05-22 08:52:06 UTC
Permalink
Post by Sebastian Oliva
You need to use the full name of the font, font("Arial Italic") works
good for me, please verify, as Ubuntu does not have the true Arial
fonts, instead it bundles a set of different fonts aliased to them.
thanks Sebastian.
i tried to find out the full names of the available fonts using the
following code on osx.

import cairo
import pango
import pangocairo

font_map = pangocairo.cairo_font_map_get_default()
families = font_map.list_families()
for font in families:
print font.get_name(), ':',
for face in font.list_faces():
print face.get_face_name(), ',',
print

for arial it prints:
Arial : Bold Italic, Bold, Italic, Regular

these work:

font('Arial')
font('Arial Regular')
font('Arial Bold')

but

font('Arial Italic')
font('Arial Bold Italic')

do not make the text italic, although they display regular or bold faces.
Post by Sebastian Oliva
want, please publish your modifications or send a patch and I'll
review them for merger into the trunk.
attached a simple patch that works for me with italic faces.

best,
gabor
Stuart Axon
2011-05-22 17:46:50 UTC
Permalink
I'd file it as a bug, may well be something that I've made a mistake on while
moving code around for rendering.. . if you can provide simple shoebot code in
the bug that demonstrates it not working, even better.

S++



----- Original Message ----
Sent: Sat, May 21, 2011 5:57:41 PM
Subject: [shoebot-devel] font styles missing
hi all,
i updated my shoebot installation to the gitourious one
(https://gitorious.org/shoebot/shoebot) and found that font styles are not
working anymore.
it seems that the code parts which are responsible for this in typography.py
are missing, although in the old repository it's there.
(https://code.goto10.org/hg/index.cgi/shoebot/file/2c9696d6e76a/shoebot/data/typography.py)
)
are there any reason for this? doesn't gitorious hold the latest version of
the code?
best,
gabor
_______________________________________________
Shoebot-devel mailing list
http://lists.tinkerhouse.net/listinfo.cgi/shoebot-devel-tinkerhouse.net
Stuart Axon
2011-05-22 17:50:01 UTC
Permalink
Ooops ignore the noise, you already fixed it ... should read all my mail before
replying :)

S++



----- Original Message ----
Sent: Sun, May 22, 2011 6:46:50 PM
Subject: Re: [shoebot-devel] font styles missing
I'd file it as a bug, may well be something that I've made a mistake on while
moving code around for rendering.. . if you can provide simple shoebot code
in
the bug that demonstrates it not working, even better.
S++
----- Original Message ----
Sent: Sat, May 21, 2011 5:57:41 PM
Subject: [shoebot-devel] font styles missing
hi all,
i updated my shoebot installation to the gitourious one
(https://gitorious.org/shoebot/shoebot) and found that font styles are not
working anymore.
it seems that the code parts which are responsible for this in
typography.py
are missing, although in the old repository it's there.
(https://code.goto10.org/hg/index.cgi/shoebot/file/2c9696d6e76a/shoebot/data/typography.py)
)
)
are there any reason for this? doesn't gitorious hold the latest version of
the code?
best,
gabor
_______________________________________________
Shoebot-devel mailing list
http://lists.tinkerhouse.net/listinfo.cgi/shoebot-devel-tinkerhouse.net
_______________________________________________
Shoebot-devel mailing list
http://lists.tinkerhouse.net/listinfo.cgi/shoebot-devel-tinkerhouse.net
Loading...