Comments (8)
Yes, I know what's happening. I'm in the process of fixing it. 👍
from penpot.
@Cenadros Can you upload both zip files generated? (or other examples)
position-data
in theory is not "mandatory" once the file is open should be re-calculated.
The thing with text in SVG is that it's pretty complex issue, SVG doesn't have any paragraph layout information. In order to calculate the correct text position in the workspace we have a process that renders the text in html and then fills the attribute "position-data" with the real positions. Foreign objects are really not well implememented on most web browsers and also they have less functionality (ie: you cannot create masks, or set gradients, etc...).
On the exporter I think you need to export the attribute content
. Once the info it's in Penpot, the process will calculate the position-data
. This will mean that the SVG you export won't show the text well, but the import process should work fine. Maybe there is a bug and that's why I need to see the generated exported files.
Thanks!
from penpot.
@Cenadros I've cloned the exporter repo and reproduced the error. I don't need the files anymore. I'll let you know when I have a fix.
from penpot.
To give more information, we have detected that the text shape without position-data lacks the information about x, y, width and height (even though the information is a basic property for the text shape it is not present anywhere in the final export).
Example without position-data:
<g id="shape-8d3796ab-e6ca-809f-8004-40729550c6b5"
style="opacity:1">
<penpot:shape penpot:name="a text"
penpot:blocked="false"
penpot:hidden="false"
penpot:type="text"
penpot:transform="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)"
penpot:transform-inverse="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)"
penpot:proportion-lock="false"
penpot:rotation="0"
penpot:center-x="130"
penpot:center-y="4.5"
penpot:grow-type="fixed"
penpot:content="{"type":"root","vertical-align":"top","children":[{"type":"paragraph-set","children":[{"line-height":1.2,"font-style":"Regular","children":[{"line-height":1.2,"font-style":"Regular","text-transform":"none","text-align":"left","font-id":"gfont-inter","font-size":"12","font-weight":"400","font-variant-id":"regular","text-decoration":"none","letter-spacing":0,"fills":[{"fill-color":"#000000","fill-opacity":1}],"font-family":"Inter","text":"a text"}],"text-transform":"none","text-align":"left","font-id":"gfont-inter","font-size":"12","font-weight":"400","type":"paragraph","font-variant-id":"regular","text-decoration":"none","letter-spacing":0,"fills":[{"fill-color":"#000000","fill-opacity":1}],"font-family":"Inter"}]}]}">
<penpot:svg-import />
</penpot:shape>
<defs />
</g>
from penpot.
Hi there @Alotor, working on this issue we noticed as well that letter-spacing is being imported into penpot but is not being applied until you modify it in the text settings in penpot. I don't know if it's related but just wanted to let you know. In any case if this is a different issue we'll report it as such.
from penpot.
Hi @Cenadros
I've just merged to develop the @Alotor PR, could you please check if it fixes the problem?
from penpot.
Hi @superalex
I've just tested it and now it works correctly. We still have the issue with the letter-spacing being imported but not rendered, but I think it's better if we manage it in another issue that we'll open if you agree with that.
from penpot.
Great!, thank you very much @Cenadros and @Alotor <3 <3 <3
from penpot.
Related Issues (20)
- Double click on text layer to set width and height to auto HOT 1
- Bug: Alt + Resize Image/Rectangle not scaling properly HOT 1
- Contributing to Korean Translation HOT 1
- feature: storing files and thumbnails in filesystem instead of DB HOT 2
- bug: Penpot doesn't work properly in Arc Browser HOT 1
- feature: mirror app to present apps design on mobile
- bug: redirect to libraries-templates don't work HOT 1
- feature: fix the position of Explore Libraries and Templates button/link so users won't have to scroll to find it HOT 1
- bug: Panning with spacebar doesn't work when the zoom cursor is enabled HOT 1
- bug: Text set to right-aligned is not properly right aligned HOT 2
- bug: Cropped right-click panel on Firefox HOT 2
- feature: permit to add objects into a instanced component HOT 2
- bug: Guides stay in place when moving board in the sidebar HOT 1
- bug: exporter time out
- bug: main ui viewer header logo icon overflows so clicking takes to home dashboard HOT 1
- bug: Components that are defined with 'Grid Element' as 'Absolute' are changed to 'Static' when duplicated. HOT 1
- feature: permit to have an image as background instead of color HOT 4
- bug: can't drag handles while in path mode HOT 3
- feature: permit to search in screen predefined size HOT 1
- feature: permit to search custom font from font list
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from penpot.