~ubuntu-branches/ubuntu/trusty/libitext-java/trusty

« back to all changes in this revision

Viewing changes to rtf/com/lowagie/text/rtf/style/RtfFont.java

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2009-10-02 21:23:15 UTC
  • mfrom: (5.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091002212315-br9lwonsyo2jgycx
* New upstream release (Closes: #549347).
* Build-Depends on libbctsp-java.
* Build-Depends on debhelper (>= 7).
* Added missing Depends on ${misc:Depends}.
* Added Vcs-Svn and Vcs-Browser fields.
* Updated Standards-Version 3.8.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: RtfFont.java 3580 2008-08-06 15:52:00Z howard_s $
 
2
 * $Id: RtfFont.java 4008 2009-07-07 09:56:52Z blowagie $
3
3
 *
4
4
 * Copyright 2001, 2002, 2003, 2004 by Mark Hall
5
5
 *
64
64
 * BaseFont fontname handling contributed by Craig Fleming. Various fixes
65
65
 * Renaud Michel, Werner Daehn.
66
66
 *
67
 
 * Version: $Id: RtfFont.java 3580 2008-08-06 15:52:00Z howard_s $
 
67
 * Version: $Id: RtfFont.java 4008 2009-07-07 09:56:52Z blowagie $
68
68
 * @author Mark Hall (Mark.Hall@mail.room3b.eu)
69
69
 * @author Craig Fleming (rythos@rhana.dhs.org)
70
70
 * @author Renaud Michel (r.michel@immedia.be)
170
170
     * Constant for a font that hides the actual text.
171
171
     */
172
172
    public static final int STYLE_HIDDEN = 512;
 
173
    
 
174
    /**
 
175
     * Default font
 
176
     * @since 2.1.7
 
177
     */
 
178
    public static final String DEFAULT_FONT = "Times New Roman";
173
179
 
174
180
    /**
175
181
     * The font name. Defaults to "Times New Roman"
176
182
     */
177
 
    private String fontName = "Times New Roman";
 
183
    private String fontName = DEFAULT_FONT;
178
184
    /**
179
185
     * The font size. Defaults to 10
180
186
     */
302
308
                    }
303
309
                }
304
310
            }
 
311
 
 
312
            if(this.fontName.equalsIgnoreCase("unknown")) {
 
313
                this.fontName = DEFAULT_FONT;
 
314
            }
305
315
            
306
316
            setSize(font.getSize());
307
317
            setStyle(font.getStyle());
311
321
            }
312
322
        }
313
323
 
314
 
        if(this.fontName.equalsIgnoreCase("unknown")) {
315
 
            return;
316
 
        }
317
 
 
318
324
        if(document != null) {
319
325
            setRtfDocument(document);
320
326
        }