Abelinkin

Q: Can someone help me understand how ePub CSS @fontface Unicode characters are supported in <td>, but not in <div> or other elements?

Hi,

 

I'm working on a project to convert several hundred thousand life sciences articles into epub format, and we have run in to a problem with character entities.

 

Being that these are scientific articles, the characters are from a wide range of Unicode charts, and are essential to transmitting the meaning of the data.

 

The problem is that in my epub, the character entity inside a table data cell is rendering the @font-face correctly, but inside any other HTML element, the character renders as an empty box on our ipad2s.

 

I've placed pre tags in hopes that the unicode will not be rendered in your browser here. The code point in this example is x1d542 just in case.

So inside div, we see boxes, inside td, we see the character rendered properly.

 

<pre>

      <div class="stix">Let &#x1d542; be a field, which will be either the complex numbers &#x02102; or the finite field &#x1d53d;</div>

      <table id="t31" rules="all">

        <tr>

          <td>&#x1d542;</td>

          <td class="stix">&#x1d542;</td>

          <td>U+1D542 MATHEMATICAL DOUBLE-STRUCK CAPITAL K </td>

        </tr>

</pre>

 

My CSS looks like this:

 

<pre>

@font-face {

    font-family: 'STIX';

    src: url('STIX-Regular.otf') format('opentype');

    font-weight: normal;

    font-style: normal;

    unicode-range:  U+02B0-02FF, U+07C0-07FF,  U+0900-097F,U+0F00-0FD8, U+1D00-1D7F, U+1D80-1DBF, U+1D400-1D7FF, U+1E00-1EFF, U+1F00-1FFE,U+2000-206F, U+20A0-20B8, U+20D0-20F0, U+2300,23FF, U+25A0-25FF, U+2600-26FF, U+27C0-27EF, U+27F0-27FF, U+2900-297F, U+2A00-2AFF, U+2B00-2B59, U+2C60-2C7F ;

}

@font-face {

    font-family: 'STIX-Math';

    src: url('STIXMath-Regular.otf') format('opentype');

    font-weight: normal;

    font-style: normal;

    unicode-range:  U+02B0-02FF, U+07C0-07FF,  U+0900-097F,U+0F00-0FD8, U+1D00-1D7F, U+1D80-1DBF, U+1D400-1D7FF, U+1E00-1EFF, U+1F00-1FFE,U+2000-206F, U+20A0-20B8, U+20D0-20F0, U+2300,23FF, U+25A0-25FF, U+2600-26FF, U+27C0-27EF, U+27F0-27FF, U+2900-297F, U+2A00-2AFF, U+2B00-2B59, U+2C60-2C7F ;

}

 

 

.stix   {

        font-family: "STIX", "STIX-Math", sans-serif;

}

 

</pre>

 

Is it possible that this is a rendering bug, because the character is rendering in the table cell, but not in other elements?

 

Have I missed something obvious?

 

Thanks,

Abe

iPad 2

Posted on Jun 4, 2012 2:03 PM

Close

Q: Can someone help me understand how ePub CSS @fontface Unicode characters are supported in <td>, but not in <div> or ot ... more

  • All replies
  • Helpful answers