I'm using instream-foriegn-objects and svg to attempt to have rotated text. it seems that i cannot set the height of the instream-foreign-object any smaller than whatever it decides to use, so my letters are all spaced out. how can I get the instream-foreign-object to not be taller than its content?

    <!-- this makes one letter -->
    <xsl:template name="v">
        <xsl:param name="text" select="''" />
        <fo:instream-foreign-object height="0.05in">
            <svg:svg height="6" width="9">
                <svg:text x="4" y="0" writing-mode="tb"
                    width="1"
                    glpyh-orientation-vertical="0">
                    <xsl:value-of select="$text" />
                </svg:text>
            </svg:svg>
        </fo:instream-foreign-object>
    </xsl:template>

    <!-- this puts one letter in a block -->
    <xsl:template name="vletter">
        <xsl:param name="letter" select="''" />
        <fo:block padding="0" margin="0">
            <xsl:call-template name="v">
                <xsl:with-param name="text" select="$letter" />
            </xsl:call-template>
        </fo:block>
    </xsl:template>

    <!-- this calls itself recursively to call vletter for each charater in the string -->
    <xsl:template name="vtext">
        <xsl:param name="text" select="''" />
        <xsl:variable name="length">
            <xsl:value-of select="string-length( $text )" />
        </xsl:variable>
        <xsl:if test="$length > 0">
            <xsl:call-template name="vletter">
                <xsl:with-param name="letter"
                    select="substring( $text, 1, 1 )" />
            </xsl:call-template>
            <xsl:call-template name="vtext">
                <xsl:with-param name="text"
                    select="substring( $text, 2 )" />
            </xsl:call-template>
        </xsl:if>
    </xsl:template>

Reply via email to