Giter VIP home page Giter VIP logo

Comments (8)

Alotor avatar Alotor commented on June 2, 2024 2

Yes, I know what's happening. I'm in the process of fixing it. 👍

from penpot.

Alotor avatar Alotor commented on June 2, 2024

@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.

Alotor avatar Alotor commented on June 2, 2024

@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.

jordisala1991 avatar jordisala1991 commented on June 2, 2024

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="{&quot;type&quot;:&quot;root&quot;,&quot;vertical-align&quot;:&quot;top&quot;,&quot;children&quot;:[{&quot;type&quot;:&quot;paragraph-set&quot;,&quot;children&quot;:[{&quot;line-height&quot;:1.2,&quot;font-style&quot;:&quot;Regular&quot;,&quot;children&quot;:[{&quot;line-height&quot;:1.2,&quot;font-style&quot;:&quot;Regular&quot;,&quot;text-transform&quot;:&quot;none&quot;,&quot;text-align&quot;:&quot;left&quot;,&quot;font-id&quot;:&quot;gfont-inter&quot;,&quot;font-size&quot;:&quot;12&quot;,&quot;font-weight&quot;:&quot;400&quot;,&quot;font-variant-id&quot;:&quot;regular&quot;,&quot;text-decoration&quot;:&quot;none&quot;,&quot;letter-spacing&quot;:0,&quot;fills&quot;:[{&quot;fill-color&quot;:&quot;#000000&quot;,&quot;fill-opacity&quot;:1}],&quot;font-family&quot;:&quot;Inter&quot;,&quot;text&quot;:&quot;a text&quot;}],&quot;text-transform&quot;:&quot;none&quot;,&quot;text-align&quot;:&quot;left&quot;,&quot;font-id&quot;:&quot;gfont-inter&quot;,&quot;font-size&quot;:&quot;12&quot;,&quot;font-weight&quot;:&quot;400&quot;,&quot;type&quot;:&quot;paragraph&quot;,&quot;font-variant-id&quot;:&quot;regular&quot;,&quot;text-decoration&quot;:&quot;none&quot;,&quot;letter-spacing&quot;:0,&quot;fills&quot;:[{&quot;fill-color&quot;:&quot;#000000&quot;,&quot;fill-opacity&quot;:1}],&quot;font-family&quot;:&quot;Inter&quot;}]}]}">
            <penpot:svg-import />
        </penpot:shape>
        <defs />
    </g>

from penpot.

Cenadros avatar Cenadros commented on June 2, 2024

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.

superalex avatar superalex commented on June 2, 2024

Hi @Cenadros

I've just merged to develop the @Alotor PR, could you please check if it fixes the problem?

from penpot.

Cenadros avatar Cenadros commented on June 2, 2024

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.

superalex avatar superalex commented on June 2, 2024

Great!, thank you very much @Cenadros and @Alotor <3 <3 <3

from penpot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.