-/*\r
- * Licensed to the Apache Software Foundation (ASF) under one or more\r
- * contributor license agreements. See the NOTICE file distributed with\r
- * this work for additional information regarding copyright ownership.\r
- * The ASF licenses this file to You under the Apache License, Version 2.0\r
- * (the "License"); you may not use this file except in compliance with\r
- * the License. You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-/* $Id$ */\r
-\r
-package org.apache.fop.fonts.truetype;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-import java.io.File;\r
-import java.io.IOException;\r
-\r
-import org.junit.Test;\r
-\r
-import org.apache.fop.fonts.EncodingMode;\r
-import org.apache.fop.fonts.FontManager;\r
-import org.apache.fop.fonts.FontResolver;\r
-\r
-/**\r
- * Test case for {@link TTFFontLoader}.\r
- */\r
-public class TTFFontLoaderTestCase {\r
-\r
- @Test\r
- public void testUseKerning() throws IOException {\r
- File file = new File("test/resources/fonts/ttf/DejaVuLGCSerif.ttf");\r
- String absoluteFilePath = file.toURL().toExternalForm();\r
- FontResolver resolver = FontManager.createMinimalFontResolver();\r
- String fontName = "Deja Vu";\r
- boolean embedded = false;\r
- boolean useKerning = true;\r
-\r
- TTFFontLoader fontLoader = new TTFFontLoader(absoluteFilePath, fontName, embedded,\r
- EncodingMode.AUTO, useKerning, resolver);\r
- assertTrue(fontLoader.getFont().hasKerningInfo());\r
- useKerning = false;\r
-\r
- fontLoader = new TTFFontLoader(absoluteFilePath, fontName, embedded, EncodingMode.AUTO,\r
- useKerning, resolver);\r
- assertFalse(fontLoader.getFont().hasKerningInfo());\r
- }\r
-}\r
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.fonts.truetype;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+import org.apache.fop.fonts.EncodingMode;
+import org.apache.fop.fonts.FontManager;
+import org.apache.fop.fonts.FontResolver;
+
+/**
+ * Test case for {@link TTFFontLoader}.
+ */
+public class TTFFontLoaderTestCase {
+
+ @Test
+ public void testUseKerning() throws IOException {
+ File file = new File("test/resources/fonts/ttf/DejaVuLGCSerif.ttf");
+ String absoluteFilePath = file.toURI().toURL().toExternalForm();
+ FontResolver resolver = FontManager.createMinimalFontResolver();
+ String fontName = "Deja Vu";
+ boolean embedded = false;
+ boolean useKerning = true;
+
+ TTFFontLoader fontLoader = new TTFFontLoader(absoluteFilePath, fontName, embedded,
+ EncodingMode.AUTO, useKerning, resolver);
+ assertTrue(fontLoader.getFont().hasKerningInfo());
+ useKerning = false;
+
+ fontLoader = new TTFFontLoader(absoluteFilePath, fontName, embedded, EncodingMode.AUTO,
+ useKerning, resolver);
+ assertFalse(fontLoader.getFont().hasKerningInfo());
+ }
+}