Hi Markus,

just found the attached file as a starting point...

Matthias

On 21.05.2015 09:14, markus.sticker.e...@zf.com wrote:

Hi Matthias,

Maybe I can build a xsl template for that.
B

*Von:*Matthias Reischenbacher [mailto:matthias8...@gmx.at]
*Gesendet:* Donnerstag, 21. Mai 2015 13:27
*An:* fop-users@xmlgraphics.apache.org
*Betreff:* Re: Question about Font selection

Hi Markus,

I'm not sure if this can be done with the fop config file. For fallbacks to other fonts inside SVGs, I normally add a second font to the SVG text element directly. So instead of just having "font-family:'Lucida sans unicode';" I automatically add another font: "font-family:'Lucida sans unicode','Arial Unicode MS'".

HTH,
Matthias

On 19.05.2015 06:58, markus.sticker.e...@zf.com <mailto:markus.sticker.e...@zf.com> wrote:

    Hi,

    my major issue is about math symbols and symbols in general.

    Just I had an issue about the symbol font on windows, now I use the
    GNU FreeFonts instead of the windows fonts, because they delivered
    the wrong character presentation.

    Now I want to set the fallback to the ArialUnicode.

    You can see I set the Arial to “any”.

    In my SVG I use the Glyph  “bracerightvertical”, one time as
    “lucida sans unicode” (this does the thrid party math exporter) and
    one time I use “Arial”

    If Arial is set as font-family the glyph is drawn.

    The log mentioned that lucida is replaced by any.

    Any is configured to Arial Unicode.

    But FOP is look on Helvetica for the vertical braces.

    So my question is how to configure the fop right that the major
    fallback will map to
    this Arial Unicode? (so that also other fonts, I don’t know today,
    will have a lookup on
    the Arial Unicode)

    Attached you will find my current configuration, fo File, pdf and
    the SVG.

    Thanks for your help.

    Best Regards

    Markus




    ---------------------------------------------------------------------

    To unsubscribe, e-mail:fop-users-unsubscr...@xmlgraphics.apache.org  
<mailto:fop-users-unsubscr...@xmlgraphics.apache.org>

    For additional commands, e-mail:fop-users-h...@xmlgraphics.apache.org  
<mailto:fop-users-h...@xmlgraphics.apache.org>


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
				version="1.0"
				xmlns:svg="http://www.w3.org/2000/svg";
				xmlns:i="http://ns.adobe.com/AdobeIllustrator/10.0/";
				xmlns:xlink="http://www.w3.org/1999/xlink";>

	<xsl:strip-space elements="*"/>

	<xsl:template match="i:pgf"/>

	<xsl:template match="*">
		<xsl:copy>
			<xsl:apply-templates select="@* | node()"/>
		</xsl:copy>
	</xsl:template>

	<xsl:template match="@*">
		<xsl:copy-of select="current()"/>
	</xsl:template>

	<xsl:template match="@font-family" priority="1">
		<xsl:attribute name="font-family">
			<xsl:value-of select="."/>
			<xsl:if test="not(contains(., 'Arial Unicode MS'))">
				<xsl:text>,Arial Unicode MS</xsl:text>
			</xsl:if>
		</xsl:attribute>
	</xsl:template>

	<xsl:template match="@style" priority="1">
		<xsl:attribute name="style">
			<xsl:choose>
				<xsl:when test="contains(., 'font-family:') and not(contains(., 'Arial Unicode MS'))">
					<xsl:value-of select="substring-before(., 'font-family:')"/>
					<xsl:text>font-family:</xsl:text>
					<xsl:variable name="rest" select="substring-after(., 'font-family:')"/>
					<xsl:choose>
						<xsl:when test="contains($rest, ';')">
							<xsl:value-of select="substring-before($rest, ';')"/>
							<xsl:text>,Arial Unicode MS;</xsl:text>
							<xsl:value-of select="substring-after($rest, ';')"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text>,Arial Unicode MS;</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="."/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
	</xsl:template>

</xsl:stylesheet>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to