tracker issue : CF-3041087

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 82354:Font size is rendered correctly when using fonts installed on the system

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Steven Erat / Steven Erat (StevenErat)

Created: 03/05/2010

Components: Document Management, PDF generation

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 273911

Priority/Frequency: Minor / Unknown

Locale/System: English / Mac 10 All

Vote Count: 5

Problem:

Font size is rendered correctly when using fonts installed on the system.  However, when the font is not installed on the system but instead is only added to the Font Mangement page of the CF Admin and fontembed=true in cfdocument, then the font size does not correctly render.At the URL shown below there is a zip file with two PDF files that demosntrate the above conditions.  Those files are:* custom_font_installed_on_system_GOOD_SIZE.pdf--This PDF was created with the code below when the font was installed on the system.  The font showed up among the system fonts in the CFAdmin.  The font styles are set to 10pt and 15pt, and the font correctly renders as the intended size.* system_font_not_installed_cfadmin_custom_font_added_BAD_SIZE.pdf--This PDF was created with the same code, but the font was removed from the system, ColdFusion was restarted, and the font was added as a custom font in the CF Admin.  The result is that the font does not render size correctly.  The font style is set to render at 15pt and 10pt, but it actually renders as the same size.When checked with Adobe Illustrator, the actual rendered font size is 24pt for both font style classes where they should be 10pt and 15pt.The correct behavior is to generate PDFs with cfdocument using custom fonts registered in CF Admin but not installed on system so that the CSS font size styling is maintained in the PDF.
Method:

Using the code below as a base, download a TTF font that is not already installed on the system.  Do not install the font.. Register the font in the CF Admin Font Management page.  Then modify the code to refer to the actual font-family name that you are using.  When you run the code to generate the pdf, the pdf notice that the font size is not displayed in the specified sizes of 10pt and 15pt.  Instead both uses of the font sizes actually render at 24pt (measured with Illustrator).=============== Code ====================<cfdocument format="PDF" fontembed="true"><style type="text/css">.largeGraffiti{font-size:15pt;font-family: ’Amsterdam Graffiti’, ’Courier New’;color: red;}.large{font-size:15pt;font-family: ’Courier New’;}.medGraffiti{font-family: ’Amsterdam Graffiti’, ’Courier New’;font-size:10pt;color: red;}.med{font-family: ’Courier New’;font-size:10pt;} </style><span class="largeGraffiti">Steven Erat 15pt Graffiti</span><br/><span class="large">Steven Erat 15pt Courier</span><br/><br/><span class="medGraffiti">Steven Erat 10pt Graffiti</span><br/><span class="med">Steven Erat 10pt Courier</span><br/><br/><br/><cfoutput>#now()#</cfoutput> </cfdocument>
Result:

No error message.  Font is rendered as wrong size in PDF.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3041087

External Customer Info:
External Company:  
External Customer Name: Steven Erat
External Customer Email: 722B2D4444633DB6992016B6
External Test Config: 03/05/2010

Attachments:

Comments: