我試圖建立一個樹的一個零件,列表,像:XSLT - XSL:FO PDF表格的行高 - Unicode的塊元素在樹
但是當我嘗試以符合垂直線(Courier New,HTML十進制:&#9474),它不會完全符合下一個塊元素。我仔細檢查了所有邊界,邊距和填充。
我還認爲,也許黑色元素本身不會填充標誌,空間,但事實並非如此,正如您可以在圖片上看到的那樣。條帶右側的元素與垂直線的大小相同。而隨着行權的元素完全吻合,垂直行不:
這裏是嵌套在一起的表的代碼:
<fo:table-body>
[...]
<fo:table-row font-size="8pt" padding-top="0pt"
margin-bottom="-3pt" margin-top="0pt" vertical-align="center"
font-family="MyCourierNew">
<fo:table-cell border-left="{$Standardrand}" font-size="11pt" font-family="MyCourierNew">
<fo:block>
<xsl:if test="$ben2 != ''">
<xsl:choose>
<xsl:when test="$naechste > $aktuelle">
│
</xsl:when>
<xsl:when test="$naechste = $aktuelle and $aktuelle > 1">
│
</xsl:when>
</xsl:choose>
</xsl:if>
</fo:block>
</fo:table-cell>
</fo:table-row>
我認真找不到問題。
不知道是否真的會解決這一點,但也許你可以嘗試設置明確所有邊界的頂部和底部邊框上'table-row'和'table-cell'爲0pt。 – potame
我懷疑你的Courier New(或者'MyCourierNew')字體是否具有箱形圖符(除非你將它們添加到'MyCourierNew'中)。有關Monotype的Courier New中的字形,請參見http://www.myfonts.com/fonts/mti/courier-new/courier-new/glyphs.html。因此,您的格式化程序可能無論如何都會替換不同字體的字形。此外,如果您可以添加實際的XSL-FO標記的片段,這將有所幫助。最後,將「padding-top」和「padding-bottom」設置爲「0pt」,將「line-height」設置爲「1」可能會有所幫助。 –
@TonyGraham將行高設置爲1解決了我的問題!非常感謝你! – MrOnkelChiller