skynav / ttt

Timed Text Toolkit
BSD 2-Clause "Simplified" License
75 stars 15 forks source link

tts:fontStyle="italic" not working? #169

Open palemieux opened 8 years ago

palemieux commented 8 years ago

tts:fontStyle="italic" does not yield italic glyphs in the attached.

ttpi000001 italic-sample.zip

skynavga commented 8 years ago

Font related styles are not yet fully implemented on inline content elements (span). However, they do function on block content elements (p, div). In addition, it is necessary to configure/use a font family that enables a mapping for italic. See attached. italic-sample-working.zip

palemieux commented 8 years ago

In addition, it is necessary to configure/use a font family that enables a mapping for italic.

Yes. I have the following

<?xml version="1.0" encoding="utf-8"?>
<fonts version="1" xmlns="http://skynav.com/ns/ttpe">
  <font>
    <param name="family">Arial</param>
    <param name="language">EN</param>
    <param name="source">arial.ttf</param>
    <param name="style">NORMAL</param>
    <param name="weight">NORMAL</param>
  </font>
  <font>
    <param name="family">Arial</param>
    <param name="language">EN</param>
    <param name="source">ariali.ttf</param>
    <param name="style">ITALIC</param>
    <param name="weight">NORMAL</param>
  </font>
</fonts>
skynavga commented 8 years ago

That configuration looks good. You might try the edited test file I just attached (changing Noto Sans to Arial) just to see if you get italic at the div/p level of specificity.

MaxEliaserAWS commented 2 years ago

@palemieux this appears to have been fixed along with issue #143 in PR #295. I retested your file (albiet with the generic "serif" instead of "Arial" and all timestamps removed) and I'm seeing italics as expected.