Index: fop-core/src/main/java/org/apache/fop/fonts/FontTriplet.java
===================================================================
--- fop-core/src/main/java/org/apache/fop/fonts/FontTriplet.java	(revision 1877558)
+++ fop-core/src/main/java/org/apache/fop/fonts/FontTriplet.java	(working copy)
@@ -65,7 +65,7 @@
      * @param priority priority of this triplet/font mapping
      */
     public FontTriplet(String name, String style, int weight, int priority) {
-        this.name = name;
+        this.name = name.toLowerCase();
         this.style = style;
         this.weight = weight;
         this.priority = priority;
Index: fop-core/src/test/java/org/apache/fop/config/FontsCaseInsensitiveTripletTestCase.java
===================================================================
--- fop-core/src/test/java/org/apache/fop/config/FontsCaseInsensitiveTripletTestCase.java	(nonexistent)
+++ fop-core/src/test/java/org/apache/fop/config/FontsCaseInsensitiveTripletTestCase.java	(working copy)
@@ -0,0 +1,83 @@
+package org.apache.fop.config;
+
+import static org.apache.fop.FOPTestUtils.getBaseDir;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.xml.sax.SAXException;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.FopConfBuilder;
+import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.apps.PDFRendererConfBuilder;
+import org.apache.fop.fonts.CustomFontCollection;
+import org.apache.fop.fonts.Font;
+import org.apache.fop.fonts.FontCollection;
+import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.fonts.FontManager;
+import org.apache.fop.fonts.FontTriplet;
+import org.apache.fop.fonts.base14.Base14FontCollection;
+import org.apache.fop.render.PrintRenderer;
+
+/**
+ * Tests that font name case-insensitivity for the {@link FontTriplet} works correctly.
+ * 
+ */
+public class FontsCaseInsensitiveTripletTestCase extends BaseConstructiveUserConfigTest {
+	
+	public FontsCaseInsensitiveTripletTestCase() throws SAXException, IOException {
+		super(new FopConfBuilder().setStrictValidation(true).startRendererConfig(PDFRendererConfBuilder.class)
+				.startFontsConfig().startFont(null, "test/resources/fonts/ttf/glb12.ttf")
+				.addTriplet("Gladiator", "normal", "bold").endFont().endFontConfig().endRendererConfig().build());
+	}
+
+	protected void testFontLookUp() throws Exception {
+		FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
+		PrintRenderer renderer = (PrintRenderer) foUserAgent.getRendererFactory().createRenderer(foUserAgent,
+				MimeConstants.MIME_PDF);
+		FontInfo fontInfo = new FontInfo();
+		renderer.setupFontInfo(fontInfo);
+		FontManager fontManager = foUserAgent.getFontManager();
+		FontCollection[] fontCollections = new FontCollection[] {
+				new Base14FontCollection(fontManager.isBase14KerningEnabled()),
+				new CustomFontCollection(fontManager.getResourceResolver(), renderer.getFontList(),
+						foUserAgent.isComplexScriptFeaturesEnabled()) };
+		fontManager.setup(fontInfo, fontCollections);
+
+		assertTrue(fontInfo.isSetupValid());
+
+		// Test that case insensitivity is honored for Base 14 fonts and custom fonts.
+		FontTriplet camelCaseLookupTriplet = fontInfo.fontLookup("Gladiator", "normal", Font.WEIGHT_BOLD);
+		FontTriplet lowerCaseLookupTriplet = fontInfo.fontLookup("gladiator", "normal", Font.WEIGHT_BOLD);
+		FontTriplet upperCaseLookupTriplet = fontInfo.fontLookup("GLADIATOR", "normal", Font.WEIGHT_BOLD);
+		FontTriplet base14LookupTriplet = fontInfo.fontLookup("HELVETICA", "normal", Font.WEIGHT_BOLD);
+
+		assertNotNull(camelCaseLookupTriplet);
+		assertEquals(camelCaseLookupTriplet.getName(), "gladiator");
+
+		assertNotNull(camelCaseLookupTriplet);
+		assertEquals(lowerCaseLookupTriplet.getName(), "gladiator");
+
+		assertNotNull(camelCaseLookupTriplet);
+		assertEquals(upperCaseLookupTriplet.getName(), "gladiator");
+
+		assertNotNull(base14LookupTriplet);
+		assertEquals(base14LookupTriplet.getName(), "helvetica");
+
+		assertNotNull(fontInfo.getInternalFontKey(lowerCaseLookupTriplet));
+		assertNotNull(fontInfo.getInternalFontKey(base14LookupTriplet));
+
+	}
+
+	protected void convertFO() throws Exception {
+		File foFile = new File(getBaseDir(), "test/xml/bugtests/mixed-cases-font.fo");
+		final boolean dumpOutput = false;
+		FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
+		convertFO(foFile, foUserAgent, dumpOutput);
+	}
+
+}
Index: fop-core/src/test/java/org/apache/fop/config/UserConfigTestSuite.java
===================================================================
--- fop-core/src/test/java/org/apache/fop/config/UserConfigTestSuite.java	(revision 1877558)
+++ fop-core/src/test/java/org/apache/fop/config/UserConfigTestSuite.java	(working copy)
@@ -34,7 +34,8 @@
         FontMetricsUrlMalformedTestCase.class,
         FontsDirectoryRecursiveTestCase.class,
         FontsAutoDetectTestCase.class,
-        FontsSubstitutionTestCase.class
+        FontsSubstitutionTestCase.class,
+        FontsCaseInsensitiveTripletTestCase.class
 })
 public class UserConfigTestSuite {
 }
Index: fop-core/src/test/java/org/apache/fop/render/ps/PSPainterTestCase.java
===================================================================
--- fop-core/src/test/java/org/apache/fop/render/ps/PSPainterTestCase.java	(revision 1877558)
+++ fop-core/src/test/java/org/apache/fop/render/ps/PSPainterTestCase.java	(working copy)
@@ -149,6 +149,7 @@
 
         IFState ifState = IFState.create();
         ifState.setFontSize(fontSize);
+        ifState.setFontFamily(fontName);
 
         PSPainter psPainter = new PSPainter(psDocumentHandler, ifState);
 
Index: fop/test/layoutengine/standard-testcases/block_font-autoselect.xml
===================================================================
--- fop/test/layoutengine/standard-testcases/block_font-autoselect.xml	(revision 1877558)
+++ fop/test/layoutengine/standard-testcases/block_font-autoselect.xml	(working copy)
@@ -44,11 +44,11 @@
   <checks>
     <eval expected="sans-serif" xpath="//flow/block[1]/lineArea/text/@font-name"/>
     <eval expected="sans-serif" xpath="//flow/block[2]/lineArea/text[1]/@font-name"/>
-    <eval expected="Symbol" xpath="//flow/block[2]/lineArea/text[2]/@font-name"/>
+    <eval expected="symbol" xpath="//flow/block[2]/lineArea/text[2]/@font-name"/>
     <eval expected="sans-serif" xpath="//flow/block[2]/lineArea/text[3]/@font-name"/>
     <eval expected="sans-serif" xpath="//flow/block[3]/lineArea/text[1]/@font-name"/>
     <eval expected="sans-serif" xpath="//flow/block[4]/lineArea/text[1]/@font-name"/>
     <eval expected="sans-serif" xpath="//flow/block[5]/lineArea/text[1]/@font-name"/>
-    <eval expected="Symbol" xpath="//flow/block[6]/lineArea/text[1]/@font-name"/>
+    <eval expected="symbol" xpath="//flow/block[6]/lineArea/text[1]/@font-name"/>
   </checks>
 </testcase>
Index: fop/test/layoutengine/standard-testcases/block_font-family.xml
===================================================================
--- fop/test/layoutengine/standard-testcases/block_font-family.xml	(revision 1877558)
+++ fop/test/layoutengine/standard-testcases/block_font-family.xml	(working copy)
@@ -51,8 +51,8 @@
     <eval expected="any" xpath="//flow/block[4]/lineArea/text/@font-name"/>
     <eval expected="any" xpath="//flow/block[5]/lineArea/text/@font-name"/>
     <eval expected="monospace" xpath="//flow/block[6]/lineArea/text/@font-name"/>
-    <eval expected="Helvetica" xpath="//flow/block[7]/lineArea/text/@font-name"/>
-    <eval expected="Helvetica" xpath="//flow/block[8]/lineArea/text/@font-name"/>
+    <eval expected="helvetica" xpath="//flow/block[7]/lineArea/text/@font-name"/>
+    <eval expected="helvetica" xpath="//flow/block[8]/lineArea/text/@font-name"/>
     <eval expected="monospace" xpath="//flow/block[9]/lineArea/text/@font-name"/>
   </checks>
 </testcase>
Index: fop/test/xml/bugtests/mixed-cases-font.fo
===================================================================
--- fop/test/xml/bugtests/mixed-cases-font.fo	(nonexistent)
+++ fop/test/xml/bugtests/mixed-cases-font.fo	(working copy)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+  <fo:layout-master-set>
+      <fo:simple-page-master master-name="simplePM"
+                    page-height="25cm"
+                    page-width="20cm"
+                    margin-top="1cm"
+                    margin-bottom="1cm"
+                    margin-left="1.5cm"
+                    margin-right="1.5cm">
+        <fo:region-body margin-top="3cm" margin-bottom="3cm"/>
+        <fo:region-before extent="2.5cm"/>
+        <fo:region-after extent="2.5cm"/>
+      </fo:simple-page-master>
+  </fo:layout-master-set>
+
+  <fo:page-sequence master-reference="simplePM">
+      <fo:flow flow-name="xsl-region-body">
+      <fo:block font-family="Courier" font-size="12pt">
+        This is a simple fo text in Courier font.
+      </fo:block>
+      <fo:block font-family="Courier" font-size="12pt"
+          font-weight="bold">
+        This is a simple fo text in bold.
+      </fo:block>
+      <fo:block font-family="courier" font-size="12pt"
+          font-style="italic">
+        This is a simple fo text in italic.
+      </fo:block>
+      <fo:block font-family="COURIER" font-size="12pt"
+          font-style="italic" font-weight="bold">
+        This is a simple fo text in italic and bold.
+      </fo:block>
+      <fo:block font-family="Courier" font-size="12pt"
+          font-variant="small-caps">
+        This is a simple fo text in small caps.
+      </fo:block>
+
+      <fo:block space-before.optimum="1cm"></fo:block>
+
+      <fo:block font-family="Times" font-size="12pt">
+        This is a simple fo text in Times font.
+      </fo:block>
+      <fo:block font-family="TIMES" font-size="12pt"
+          font-weight="bold">
+        This is a simple fo text in bold.
+      </fo:block>
+      <fo:block font-family="times" font-size="12pt"
+          font-style="italic">
+        This is a simple fo text in italic.
+      </fo:block>
+      <fo:block font-family="Times" font-size="12pt"
+          font-style="italic" font-weight="bold">
+        This is a simple fo text in italic and bold.
+      </fo:block>
+      <fo:block font-family="Times" font-size="12pt"
+          font-variant="small-caps">
+        This is a simple fo text in small caps.
+      </fo:block>
+
+      <fo:block space-before.optimum="1cm"></fo:block>
+
+      <fo:block font-family="Gladiator" font-size="12pt">
+        This is a simple fo text in Helvetica font.
+      </fo:block>
+      <fo:block font-family="GLADIATOR" font-size="12pt"
+          font-weight="bold">
+        This is a simple fo text in bold.
+      </fo:block>
+      <fo:block font-family="gladiator" font-size="12pt"
+          font-style="italic">
+        This is a simple fo text in italic.
+      </fo:block>
+      <fo:block font-family="Helvetica" font-size="12pt"
+          font-style="italic" font-weight="bold">
+        This is a simple fo text in italic and bold.
+      </fo:block>
+      <fo:block font-family="Helvetica" font-size="12pt"
+          font-variant="small-caps">
+        This is a simple fo text in small caps.
+      </fo:block>
+
+    </fo:flow>
+  </fo:page-sequence>
+</fo:root>
