GithubHelp home page GithubHelp logo

Comments (11)

palemieux avatar palemieux commented on May 28, 2024

Can you provide a sample file?

from imscjs.

palemieux avatar palemieux commented on May 28, 2024

Deployed fix that corrects the behavior with the sample at https://github.com/IRT-Open-Source/irt-ebu-tt-d-application-samples/blob/master/ttml/space-preserve-001-ttml.xml

from imscjs.

davemevans avatar davemevans commented on May 28, 2024

It's better, but still not right. The width looks correct now but I think the height is wrong.

sedlobortis

Source is sedlobortis.txt

from imscjs.

davemevans avatar davemevans commented on May 28, 2024

As an aside, I think when you do:

svg.setAttribute('width', vdiv.clientWidth);
svg.setAttribute('height', vdiv.clientHeight);

you need to add + 'px' to set the right unit type on the SVGLength?

from imscjs.

palemieux avatar palemieux commented on May 28, 2024

@bbcrddave Added 'px'. Looks good in Chrome and Firefox on my side.

from imscjs.

davemevans avatar davemevans commented on May 28, 2024

It is working correctly in Firefox, but in Chrome (55, Win7) the computed clientHeight for rdiv is still 563px, which seems to be causing the incorrect PNG rendering. The screenshot below shows that, whilst there is no gradient fill in the extra space, the dimensions are incorrect and hence the text fails to scale correctly.

screens

from imscjs.

palemieux avatar palemieux commented on May 28, 2024

Here's what I get using Chrome 55. Any chance the browser cache might be stale? Just exploring all possibilities.

0

from imscjs.

davemevans avatar davemevans commented on May 28, 2024

Just tried it in an incognito window and also in Canary and get the same result as previously 😞

from imscjs.

palemieux avatar palemieux commented on May 28, 2024

@bbcrddave Is the zoom level !== 100%?

from imscjs.

palemieux avatar palemieux commented on May 28, 2024

height and width of the exported PNG now set explicitly. Fixes the output bug when using a zoom level !== 100% in Chrome.

from imscjs.

davemevans avatar davemevans commented on May 28, 2024

That change does seem to have fixed the issue - thanks!
Zoom level is 100% though. 😕

from imscjs.

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.