From b4613083657e721533f12dfc86a6dc2cb833bf71 Mon Sep 17 00:00:00 2001
From: Graeme Geldenhuys <graeme@mastermaths.co.za>
Date: Fri, 6 Aug 2010 17:03:44 +0200
Subject: docview: Removed the check for FontType = ftOutline.

We always use outline fonts in fpGUI.
---
 docview/components/richtext/CanvasFontManager.pas | 25 ++++++++++-------------
 1 file changed, 11 insertions(+), 14 deletions(-)

(limited to 'docview/components')

diff --git a/docview/components/richtext/CanvasFontManager.pas b/docview/components/richtext/CanvasFontManager.pas
index 38f87cd1..8a15e914 100644
--- a/docview/components/richtext/CanvasFontManager.pas
+++ b/docview/components/richtext/CanvasFontManager.pas
@@ -523,7 +523,7 @@ begin
   end;
 
   if Fontinfo = '' then
-    // nothing found se use default font of fpGUI
+    // nothing found so use default font of fpGUI
     FontInfo := fpgApplication.DefaultFont.FontDesc;
 end;
 
@@ -834,19 +834,16 @@ var
   s: string;
 begin
   // Select the logical font
-  if Font.FontType = ftOutline then
-  begin
-    s := Font.FaceName + '-' + IntToStr(Font.PointSize);
-    if faBold in Font.Attributes then
-      s := s + ':bold';
-    if faItalic in Font.Attributes then
-      s := s + ':italic';
-    if faUnderScore in Font.Attributes then
-      s := s + ':underline';
-
-    f := fpgGetFont(s);
-    FCanvas.Font := f;
-  end;
+  s := Font.FaceName + '-' + IntToStr(Font.PointSize);
+  if faBold in Font.Attributes then
+    s := s + ':bold';
+  if faItalic in Font.Attributes then
+    s := s + ':italic';
+  if faUnderScore in Font.Attributes then
+    s := s + ':underline';
+
+  f := fpgGetFont(s);
+  FCanvas.Font := f;
 end;
 
 // Get a font to match the given spec, creating or re-using an
-- 
cgit v1.2.3-70-g09d2