My code to reassemble text from pieces written to EMF files is working
great now except for one nagging problem, which
only shows up in a few special cases involving manually kerned text.
Consider these three sequences:
1. <period><space><A>(hkern + 3.75)<vertical bar>
2. <period><A>(hkern + 3.75)<vertical bar>
3. <period><space><A><vertical bar>
The individual pieces written to the EMF (not reassembled) map exactly
onto the originals, so there is no problem
in the output coordinates. However, when reassembled into a single
<text><tspan> complex (2) and (3) are still OK, but
(1) is off, with the vertical bar offset leftwards towards the "A", yet
the ". A" is exactly where it should be.
I have tracked the problem down to the extent that I know Inkscape's
display code is calculating
the width of ". A" differently, when manual kerning is present, than
just the sum of the advances of those characters.
(Logic: the complex looks like
<text><tspan></tspan><tspan</tspan><text> and the second tspan pair has
a dx value calculated by subtracting from the start position of the
fragment [which is correct] the start position of the previous fragment
[which is also correct] plus the width of the previous fragment [which
must therefore not be correct]. Changing dx to match the original
kerning fixes the problem - also consistent with the calculated width
not matching that from Freetype2.) Inkscape seems not to be using
Freetype Kerning corrections of this type:
I tried adding that, and while there was a correction for " A", it only
half fixed the problem. Besides, I could not
find a call to FT_Get_Kerning anywhere in the source. (It might be
called indirectly by some other library.)
This was all done on one machine, so it isn't a case of mismatched
fonts between machines.
Anybody have a thought on what Inkscape might be doing to come up with
a different string width in this particular instance?
Manager, Sequence Analysis Facility, Biology Division, Caltech
I'm developing an extension to manage translations (which I do via
launchpad and xml2po) but I'm having trouble with tspans.
The problem seems to be that inkscape saves multiple values for the x
attribute for some (not all) tspan sections. Specifying the letter
placements is death to translations as the number and size of letters is
guaranteed to be different.
Is there any api way to strip out these bumbling attributes or better
have them not appear in the first place?
Thanks for your time.
Best Regards, Martin Owens
SpiroLive branch update.
Fix some redraws problems.
Full comented SpiroLive code, in spanish sorry ¿Any tranlator?
Regression to original codebase "sp_pen_context_set_polyline_mode"
overloading whith a new function "sp_pen_context_set_mode"
I want to mark for include in codebase, feedback are welcome.
Translated by google
I just upgraded to SpiroLive branch as directed by Sorin, with which I
agree. Containing historical remains above 11,864 revision behavior.
For a lack of knowledge on how to mine working with Bazaar, are not
available, this time, the various revisions between one version and
I made a change to code that I would like, in the files
"pen-context.cpp", "pen-context.h", "draw-context.cpp" and "widgets /
pencil-toolbar-cpp" is used function called
"sp_pen_context_set_polyline_mode" that is developed in the
This function is used to change the mode (polyline, paraxial ...). I
have seen fit to extend its scope to also define whether we are in
"Spiro" or, in the future, whether we are in "BSpline".
To this I added a boolean property to the object "SPPenContext" called
"spiro" (pc-> spiro) and changed the name of the function in the three
previous files "sp_pen_context_set_polyline_mode" a
On the use of the tool, I had to update the message status bar with the
string "SHIFT for cusp node" and see how they manage the translations.
Usage is simple, clicks create SYMM nodes with "SHIFT" are created but
are mode CUSP.
I ask you to try the code, especially continuing existing lines and / or
Acabo de actualizar el branch de SpiroLive siguiendo las indicaciones de
Sorin, con las que estoy de acuerdo. Queda como histórico conteniendo el
anterior comportamiento la revisión 11864 .
Por una falta de conocimientos mios en la manera de trabajar con Bazaar,
no están disponibles, esta vez, las distintas revisiones entre una
versión y la otra.
He realizado un cambio en código que me gustaría comentar, en los
archivos "pen-context.cpp", "pen-context.h", "draw-context.cpp" y
"widgets/pencil-toolbar-cpp" se utiliza una función llamada
"sp_pen_context_set_polyline_mode" que está desarrollada en el archivo
Esta función sirve para cambiar el modo (polilinea,paraxial...). He
creído conveniente ampliar su alcance para definir también si estamos en
modo "Spiro" o para, en el futuro, saber si estamos en modo "BSpline".
Para ello he añadido una propiedad booleana a el objeto "SPPenContext"
llamada "spiro" (pc->spiro) y he cambiado el nombre de la función en los
tres archivos anteriores de "sp_pen_context_set_polyline_mode" a
En cuanto al uso de la herramienta, me falta actualizar los mensajes de
la barra de estado con el string "SHIFT for cusp node" y ver como se
gestionan las traducciones. El uso es simple, los clics crean nodos
SYMM, con la tecla "SHIFT" se crean pero son de modo CUSP.
Os pido que probéis el código, especialmente continuando líneas
existentes y/o cerrándolas.
I'm not really sure about this being really a bug so I'm asking before
creating a bug report.
The bug is checked using Windows 7 64 bits and Inkscape 0.48
The steps for reproducing are:
1. Create empty file.
2. Create a rectangle ( or any other shape )
3. Open Fill and Stroke menu
4. Select Stroke tab.
5. Grab color picker tool.
6. Select any color in the document.
What happens: The fill colour becomes the one picked with the tool.
What I think it should happen: Since the stroke tab is selected, the
stroke colour should become the one selected with the tool and not the
So I am missunderstanding Inkscape or is it a real bug ?
Please avoid sending me Word or PowerPoint attachments.
It's almost time we move on to Feature Freeze, at this point I'm
saying let's put it out there as November 30th. I had delayed it to
get in a couple new features and the reason I'm not just saying it's
today is to leave it open for John Smith for a shortcut editor akin to
GIMP's (if it can be completed in time).
The current list of bugs milestoned for 0.49 is at 50... and that is
quite high. Can people help reduce this number some? My guess is
things like the tutorial updates for 0.49 are not likely to make it
The real issue though is that we currently have 13 blocker bugs, all
but one of which are regressions caused by the new renderer or
In addition to these blockers, we still have a security bug that is
blocking 0.48.4 and will also block 0.49.
Please focus efforts on fixing bugs rather than enhancing features at
this point. The two exceptions to this are for the shortcut editor and
the newly committed symbols dialog, polishing things like this is
String Freeze will go into effect on November 30th at this point, but
I HIGHLY recommend translators get started now if they haven't started
already (as was previously recommended).
Unfortunately, it does not look like we're going to be able to get the
release out this year as originally hoped. At the current rate I hope
we can get it out in Q1 of next year.
Sorry for not giving an update sooner. I hope all is well with everyone!
Thanks very much. I update the branch and tell in the list the number of
the previous branch whith old staff for posibol regression.
> On Wed, 2012-11-14 at 13:36 +0100, Jabier Arraiza wrote:
>> Im new to develop whith BZR. I develop a branch, and after i made a
>> of changes on the branch but i want to know what version of code is
>> What i do? 2 branches or update original branch whith the new code.
>> The new code is more powerful but im not sure is ok whith the
>> of inkscape, because made more changes to the code and change some
>> behviors on usage.
> If you want to compare a branch, to let's say trunk you can do that
> using bzr by specifying the branch. So:
> $ bzr diff --new lp:inkscape
> Would compare to trunk. Usually I find it useful to compare to the
> common ancestor as the diff is a bit cleaner:
> $ bzr diff -r ancestor:lp:inkscape
> If you'd like to update your branch to include the changes that are on
> trunk currently you can just merge them in. No need to worry about
> rebasing or anything like that, Bazaar handles it for you.
> $ bzr merge lp:inkscape
> $ bzr commit -m "Updating to trunk"
> It's difficult to know which is "better", but hopefully that helps you
> figuring out the information you need.
This information could be added to our Bazaar tutorial:
How does sodipodi:linespacing determine the vertical spacing to the
From a bit of experimenting it looks like it starts with this:
and then looks at the maximum font size in all of the <tspan>'s
included under the following
and multiplies those together. So if the largest is 16pt, it uses 20pt
for the linespacing.
Is there anything else involved, or is that the entire method?
Also, if this is all inside a <text> with
Changing font-size or line-height makes absolutely no difference in the
display. Is that how it should be?
Manager, Sequence Analysis Facility, Biology Division, Caltech