Hi,
I need to know the geometry of several words, so I write a litle php-prog to get all informations, and write it in a file. But the some returned heights could not be true, why?
I use folowing template for each word (%_?_% is replaced with valid parameters):
<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
<text style="font-size: %fontsize%;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family: %fontname%" x="%x%" y="%y%" id="testWort">%text%</text>
</svg>
Then I save the generated svg to disc: svg_temp.svg. And quering witdth and height with:
inkscape svg_temp.svg --query-width --query-id testWort inkscape svg_temp.svg --query-height --query-id testWort
The returned values are saved in following file, which shows %text% :: %fontname% :: %fontsize% :: WIDTH :: HEIGHT
bis 180m::URW Palladio L::48::189.29175::69.696 bis 915m::URW Palladio L::48::189.29175::52.224 bis 2745m::URW Palladio L::48::213.29175::51.072
So, why is 'bis 180m' 69.696pt tall, where 'bis 915m' and 'bis 2745m' are both about 51pt?
Same strange behaviour also occurs with other words. E.g.:
Gerastos::URW Palladio L::72::310.86675::91.368 Aulis::URW Palladio L::72::187.33612::62.784 Theben::URW Palladio L::72::241.34963::60.696
Thanks for help
Lorenz
On 6/15/06, Lorenz Haas <lorenz@...1942...> wrote:
So, why is 'bis 180m' 69.696pt tall, where 'bis 915m' and 'bis 2745m' are both about 51pt?
Just open that file in Inkscape, select the text object, and see if its reported height there (in selector controls above the canvas) is also 69px (note px, not pt). If it is, just look at the text to see visually what pushes the bounding box vertically. Does the height change if you convert text to path? If you still can't figure out, send me the file and the font :)
Am Donnerstag, 15. Juni 2006 16:54 schrieb bulia byak:
... If it is, just look at the text to see visually what pushes the bounding box vertically. Does the height change if you convert text to path?
Hi again,
the bounding box has a lot of spacing. I had recognized that bevor, but thought that this is normal for texts. After converting to path the bounding box is close to the letters. I think I have found out the problem: The bounding box was false because "URW Palladio L" is an Type1-font. Other Type1-fonts also had strange bounding boxes.
"URW Palladio L" is a nice font, and I want to use it, so befor I convert it to TTF ist it possible to change the text to Path under a console?
Thanks, Lorenz
On 6/16/06, Lorenz Haas <lorenz@...1942...> wrote:
"URW Palladio L" is a nice font, and I want to use it, so befor I convert it to TTF ist it possible to change the text to Path under a console?
Not yet.
You can try to load the font into FontForge, view the boxes of all characters and fix those that look wrong.
participants (2)
-
bulia byak
-
Lorenz Haas