silnrsi / font-padauk

Padauk pan Myanmar font
Other
28 stars 7 forks source link

ftml incompatibility #13

Closed bobh0303 closed 3 years ago

bobh0303 commented 7 years ago

bin/ftml.xsl, which is intended to render ftml files in a browser, contains the following:

<xsl:param name="fontsrc" select="ftml/head/fontsrc"/>
...
    @font-face {font-family: TestFont; src: url(<xsl:value-of select="$fontsrc"/>); }

which, because of the presence of the url(...) wrapper, implies that the fontsrc parameter is expected to be a path to a file.

However, the ftml specification says that the fontsrc element

has a text child which is in the same format as src: parameter of the css @font-face attribute.

which means that fontsrc will already contain the url(...) wrapper around the path (or might contain local(...), etc.)

Thus that @font-face line should read:

    @font-face {font-family: TestFont; src: <xsl:value-of select="$fontsrc"/>; }

I assume this implies a change to the way smith test works.

bobh0303 commented 4 years ago

This still isn't right -- and as far as I can tell probably isn't working correctly as is. The line used to read: @font-face {font-family: TestFont; src: url(<xsl:value-of select="$fontsrc"/>); } and now reads: @font-face {font-family: TestFont; src: (<xsl:value-of select="$fontsrc"/>); } which causes an error in the CSS processing: image and you probably aren't seeing what you want in the ftml test results.

Where we want to be is as I put in the initial description: the line should read: @font-face {font-family: TestFont; src: <xsl:value-of select="$fontsrc"/>; } HOWEVER this will require a change to smith.