Bug 497462

Summary: feature request: smaller font size for code samples
Product: [Community] Publican Reporter: Darrin Mison <dmison>
Component: publicanAssignee: Ruediger Landmann <rlandman>
Status: CLOSED CURRENTRELEASE QA Contact: Joshua Wulf <jwulf>
Severity: low Docs Contact:
Priority: low    
Version: 2.0CC: jfearn, lcarlon, mmcallis, publican-list
Target Milestone: ---Keywords: Documentation
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-25 23:53:02 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Darrin Mison 2009-04-23 22:15:37 EDT
Description of problem:

The monospaced font used for code samples is sized larger than the regular text.  This is often a problem with java code samples due to the verbosity of the language.  A smaller font size would be preferred.

/usr/share/publican/xsl/pdf.xsl has 

114 <xsl:attribute-set name="monospace.properties">
115     <!-- xsl:attribute name="font-size">9pt</xsl:attribute -->
116     <xsl:attribute name="font-family">
117         <xsl:value-of select="$monospace.font.family"/>
118     </xsl:attribute>
119 </xsl:attribute-set>

Uncommenting the font-size attribute applies to all instances of the monospace font. 9pt looks ok, even 8pt is readable for me.  I don't know what typographical issues this could lead to.
Comment 1 Michael Hideo 2009-06-16 22:26:19 EDT
Leaving this for the QA run post docs.redhat.com
Comment 3 Jeff Fearn 2009-09-30 20:57:35 EDT
(In reply to comment #0)
> Description of problem:
> 
> The monospaced font used for code samples is sized larger than the regular
> text.  This is often a problem with java code samples due to the verbosity of
> the language.  A smaller font size would be preferred.
> 
> /usr/share/publican/xsl/pdf.xsl has 
> 
> 114 <xsl:attribute-set name="monospace.properties">
> 115     <!-- xsl:attribute name="font-size">9pt</xsl:attribute -->
> 116     <xsl:attribute name="font-family">
> 117         <xsl:value-of select="$monospace.font.family"/>
> 118     </xsl:attribute>
> 119 </xsl:attribute-set>
> 
> Uncommenting the font-size attribute applies to all instances of the monospace
> font. 9pt looks ok, even 8pt is readable for me.  I don't know what
> typographical issues this could lead to.  

Personally I'd rather make the font size a ratio of body.font.master, which defaults to 10.

e.g.

	<xsl:attribute name="font-size">
		<xsl:value-of select="$body.font.master * 0.9"/>
		<xsl:text>pt</xsl:text>
	</xsl:attribute>

That way if you increase body.font.master, say for a large print version, then you only need to change one variable.

Does anyone else have an opinion on changing the monospace font size? Changing it here will affect ALL uses of monospace, including verbatim items such as screen and synopsis.

Cheers, Jeff.
Comment 4 Jeff Fearn 2009-10-01 19:27:11 EDT
Changed shade.verbatim font size to * 0.8 in PDF and x 0.9 in HTML.
Comment 5 Fedora Update System 2009-11-17 21:18:35 EST
publican-1.2-0.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/publican-1.2-0.fc12
Comment 6 Fedora Update System 2009-11-20 00:17:37 EST
publican-1.2-0.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2009-11-25 09:52:44 EST
publican-1.2-0.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.