Comments (11)
Can you provide a sample file?
from imscjs.
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.
It's better, but still not right. The width looks correct now but I think the height is wrong.
Source is sedlobortis.txt
from imscjs.
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.
@bbcrddave Added 'px'. Looks good in Chrome and Firefox on my side.
from imscjs.
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.
from imscjs.
Here's what I get using Chrome 55. Any chance the browser cache might be stale? Just exploring all possibilities.
from imscjs.
Just tried it in an incognito window and also in Canary and get the same result as previously 😞
from imscjs.
@bbcrddave Is the zoom level !== 100%?
from imscjs.
height and width of the exported PNG now set explicitly. Fixes the output bug when using a zoom level !== 100% in Chrome.
from imscjs.
That change does seem to have fixed the issue - thanks!
Zoom level is 100% though. 😕
from imscjs.
Related Issues (20)
- Upgrade to use es6 language features? HOT 1
- `Set()` has a name clash with the ES6 `Set` object HOT 1
- Multiple referenced generic font family names can result in duplicate font-family values
- Error parsing fontSize with two lengths HOT 2
- Improve performance with a large number of regions and ISDs
- Unable to specify rgba color values for tts:textShadow HOT 1
- elementBoundingRect needs to be declared a `var`
- Update timeBase attribute to accept full list of values HOT 6
- adjacent tts:textCombine spans are combined into a single span HOT 3
- HTML rb, rtc and rbc elements are deprecated HOT 2
- if a line starts/ends with a ruby definition, line padding is not applied
- SMPTE timecode parsed incorrectly (23.976 FPS) HOT 1
- Resolve images source while generating ISD HOT 18
- Replace the XML SAX parser with a DOM parser HOT 6
- Spaces in `tts:fontFamily` list not handled in HTMLStylingMapDefinition code HOT 1
- Firefox bug with negative margins HOT 1
- FontFamily `default` name mapping missing HOT 7
- fillLineGap doesn't always fill the gap HOT 11
- Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'imscISD') HOT 4
- Add presentation customisation options
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 imscjs.