This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
SVG export, fonts #109
Comments
Hello Benjamin,
Handling font in SVG is a bit tricky. We need font encoded witht the
WOFF format. (Web Open Font Format). Tulip uses ttf fonts. This should
be possible if we add all woff file along with the ttf file (already the
case for the node shape icons)
The SVG export uses the viewFontSize property only. The
viewLabelPosition property is not handled (on the todo list since a long
time).
Moreover, if the NLD view is configured with dynamic font size (the
default, see the Scene options tab), the font size property is not used
by Tulip. The svg export module cannot use this feature by design (an
export module cannot do this). By default, all nodes have the same size
in the property.
Best,
Bruno
Le 08/05/2019 à 02:27, Benjamin Renoust a écrit :
I am trying the SVG export, I haven't used it since... a very long
time ago.
It has been really improved! Thank you very much!
However, properties of the fonts seem to be ignored (or is there a
hack I do not know?).
The font itself seems ignored, the property of the font (bold italic
etc.) too, the size of the font also, and the label position.
It seems that by default, all fonts are set to fit node size.
Here is attached an example of a legend before and after SVG rendering:
Before SVG (captured from Tulip)
Capture d’écran 2019-05-08 à 09 14 45
<https://user-images.githubusercontent.com/1753109/57340974-5b647a00-7173-11e9-97e6-1f94468ac5d9.png>
After SVG export (rendered under Chrome)
Capture d’écran 2019-05-08 à 09 14 54
<https://user-images.githubusercontent.com/1753109/57340981-5e5f6a80-7173-11e9-952e-38569a41fb7a.png>
Best,
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#109>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEJ73FVQLSHOMNSLRRVXC73PUIM7BANCNFSM4HLNNSAQ>.
--
Bruno Pinaud
Maitre de conférences/Associate Professor
Université de Bordeaux
LaBRI UMR CNRS 5800
|
Hi Bruno,
As I forgot to specify in my first post, I deactivate the dynamic font size
of course,
but still the label seem to be "fit" in the dedicated node.
But yeah, I understand the font constraints.
I have benchmarked the size of font as in the following pictures:
from Tulip:
<img width="605" alt="Capture d’écran 2019-05-10 à 08 42 04" src="https://user-images.githubusercontent.com/1753109/57493722-2b4ae180-7301-11e9-9732-b5017d30745e.png">
From Inkscape after SVG export:
<img width="69" alt="Capture d’écran 2019-05-10 à 08 41 52" src="https://user-images.githubusercontent.com/1753109/57493712-1f5f1f80-7301-11e9-8afc-74d11f33bb01.png">
It seems the behavior is 'fit to node size' no matter what.
Here is my test on the font styles (italic, bold, etc.):
Tulip:
<img width="356" alt="Capture d’écran 2019-05-10 à 08 48 40" src="https://user-images.githubusercontent.com/1753109/57493745-3998fd80-7301-11e9-8c32-cc3f9be7e8d7.png">
Inkscape:
<img width="374" alt="Capture d’écran 2019-05-10 à 08 49 26" src="https://user-images.githubusercontent.com/1753109/57493748-3d2c8480-7301-11e9-9e76-d0bb92382f71.png">
As a hack, I'm thinking of creating invisible nodes of the size the
expected bounding box, with labels,
and place them in the expected area before exporting to SVG.
I hope that helps,
…--
Benjamin
[edit to integrate pictures]
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying the SVG export, I haven't used it since... a very long time ago.
It has been really improved! Thank you very much!
However, properties of the fonts seem to be ignored (or is there a hack I do not know?).
The font itself seems ignored, the property of the font (bold italic etc.) too, the size of the font also, and the label position.
It seems that by default, all fonts are set to fit node size.
Here is attached an example of a legend before and after SVG rendering:
Before SVG (captured from Tulip)
After SVG export (rendered under Chrome)
Best,
The text was updated successfully, but these errors were encountered: