是否可以在xsl-fo中更改连字符的字体系列?

问题描述 投票:0回答:1

我想使用此字符并带有我的连字符:(有关https://www.fileformat.info/info/unicode/char/21b5/index.htm字符的信息)。

在我的XSL代码中,我有:

<xsl:attribute name="hyphenate">true</xsl:attribute>
<xsl:attribute name="hyphenation-character">↵</xsl:attribute>

但是角色没有出现。我认为这是因为我使用的字体家族是Roboto Mono(https://fonts.google.com/specimen/Roboto+Mono),没有该字符。

是否可以仅更改连字符的字体系列?还是可以指定一个外部图形用作连字符?

我正在使用XEP进行转换。

xsl-fo
1个回答
0
投票

font-family可以采用逗号分隔的字体系列名称序列(请参见https://www.w3.org/TR/xsl11/#font-family)。您可以在属性中添加确实具有font-family字符after'Roboto Mono'的字体的名称,并且格式化程序在发现'Roboto Mono'不具有第二种字体时应尝试使用第二种字体字形。

可能还需要设置font-selection-strategy="character-by-character"(请参阅https://www.w3.org/TR/xsl11/#font-selection-strategy)以强制更改一个字符的字体。

© www.soinside.com 2019 - 2024. All rights reserved.