Skip to content

Commit

Permalink
Merge pull request #671 from openSUSE/589-overlapping-titles
Browse files Browse the repository at this point in the history
Fix #589: Overlapping product text in cover page
  • Loading branch information
tomschr authored Feb 13, 2025
2 parents 99358e7 + 5bb520f commit b911ee6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
15 changes: 10 additions & 5 deletions suse2022-ns/fo/book.titlepage.templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,14 @@
<fo:table width="{(&column; * 7) + (&gutter; * 5)}mm"
table-layout="fixed" block-progression-dimension="auto">
<fo:table-column column-number="1" column-width="{&column;}mm"/>
<fo:table-column column-number="2"
column-width="{(&column; * 6) + (&gutter; * 5)}mm"/>
<fo:table-column column-number="2" column-width="{(&column; * 6) + (&gutter; * 5)}mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block> </fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block padding-before="&columnfragment;mm">
<fo:block role="suse-productname">
<!-- We use the full productname here: -->
<xsl:apply-templates mode="book.titlepage.recto.auto.mode"
select="d:bookinfo/d:productname[not(@role='abbrev')]|d:info/d:productname[not(@role='abbrev')]"/>
Expand Down Expand Up @@ -163,9 +162,15 @@

<xsl:template match="d:productname[not(@role='abbrev')]"
mode="book.titlepage.recto.auto.mode">
<xsl:variable name="size-factor">
<xsl:call-template name="get.l10n.property">
<xsl:with-param name="property" select="'book-productname-factor'"/>
</xsl:call-template>
</xsl:variable>
<fo:block text-align="start" hyphenate="false"
line-height="{$base-lineheight * 0.85}em"
font-size="{&xxx-large; * $sans-fontsize-adjust}pt"
line-height="{$base-lineheight * 0.95}em"
font-size="{&xxx-large; * $sans-fontsize-adjust * $size-factor}pt"
font-weight="normal"
space-after="&gutterfragment;mm"
xsl:use-attribute-sets="title.font dark-green sans.bold.noreplacement">
<!-- FIXME: fix grayscale mode for c_mint_60 -->
Expand Down
11 changes: 11 additions & 0 deletions suse2022-ns/fo/l10n.properties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@
right to left (value: "rl"), many other languages are written
left to right (value: "lr") -->
<prop-type name="writing-mode">string</prop-type>

<!-- book-productname-factor: A factor that is applied to the fonts-size
of the productname on the cover page -->
<prop-type name="book-productname-factor">float</prop-type>
</prop-types>

<lang code="default">
Expand All @@ -146,6 +150,7 @@
<prop name="sans-cutoff-factor">1</prop>
<prop name="enable-text-justification">true</prop>
<prop name="writing-mode">lr</prop>
<prop name="book-productname-factor">1.0</prop>
</lang>
<lang code="ar">
<!-- Kufic fonts are regarded as rather unreadable, so only use a Naskh (roughly: serif) font. -->
Expand All @@ -169,6 +174,7 @@
<prop name="sans-cutoff-factor">0.8</prop>
<prop name="enable-text-justification" ref-lang="default"/>
<prop name="writing-mode">rl</prop>
<prop name="book-productname-factor">0.825</prop>
</lang>
<lang code="ja">
<!-- Yes, the Western characters from IPA P look horrible to the
Expand Down Expand Up @@ -204,6 +210,7 @@
<prop name="sans-cutoff-factor">0.85</prop>
<prop name="enable-text-justification">false</prop>
<prop name="writing-mode" ref-lang="default"/>
<prop name="book-productname-factor">0.825</prop>
</lang>
<lang code="ko">
<prop name="serif" ref-name="sans"/>
Expand All @@ -225,6 +232,8 @@
<prop name="sans-cutoff-factor">0.85</prop>
<prop name="enable-text-justification">false</prop>
<prop name="writing-mode" ref-lang="default"/>
<prop name="book-productname-factor">0.9</prop>
<prop name="book-productname-factor">0.825</prop>
</lang>
<lang code="zh_cn">
<!-- Simplified Chinese is most often printed as sans-serif, so use
Expand All @@ -251,6 +260,7 @@
<prop name="sans-cutoff-factor">0.85</prop>
<prop name="enable-text-justification">false</prop>
<prop name="writing-mode" ref-lang="default"/>
<prop name="book-productname-factor">0.825</prop>
</lang>
<lang code="zh_tw">
<!-- Traditional Chinese apparently is almost always printed as
Expand Down Expand Up @@ -289,5 +299,6 @@
<prop name="sans-cutoff-factor">0.75</prop>
<prop name="enable-text-justification">false</prop>
<prop name="writing-mode" ref-lang="default"/>
<prop name="book-productname-factor">0.6</prop>
</lang>
</properties>
2 changes: 1 addition & 1 deletion suse2022-ns/fo/l10n.properties.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<xsl:with-param name="context-desc" select="'l10n property'"/>
<xsl:with-param name="message">
<xsl:text>The requested property </xsl:text>
<xsl:value-of select="$string"/>
<!-- <xsl:value-of select="$string"/>-->
<xsl:value-of select="$property"/>
<xsl:text> has no registered property type.</xsl:text>
</xsl:with-param>
Expand Down

0 comments on commit b911ee6

Please sign in to comment.