Skip to content

Commit

Permalink
Merge pull request #97 from sesteel/master
Browse files Browse the repository at this point in the history
Changed how FontData.name was being Accessed
  • Loading branch information
sesteel committed Feb 27, 2014
2 parents 98886bc + effa09b commit 3b0225a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project details
group=com.readytalk
version=2.1.2
version=2.1.3


# Optimize the build environment
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/readytalk/swt/text/painter/TextPainter.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ private TextPainter setFont(final String name, final int height) {
* @return {@link TextPainter}
*/
public TextPainter setDefaultFontHeight(final int height) {
font = FontFactory.getFont(this.parent.getDisplay(), height, SWT.NORMAL, font.getFontData()[0].name);
boldFont = FontFactory.getFont(this.parent.getDisplay(), height, SWT.BOLD, boldFont.getFontData()[0].name);
italicFont = FontFactory.getFont(this.parent.getDisplay(), height, SWT.ITALIC, italicFont.getFontData()[0].name);
underlineFont = FontFactory.getFont(this.parent.getDisplay(), height, SWT.UNDERLINE_LINK, underlineFont.getFontData()[0].name);
boldAndItalicFont = FontFactory.getFont(this.parent.getDisplay(), height, SWT.ITALIC|SWT.BOLD, boldAndItalicFont.getFontData()[0].name);
font = FontFactory.getFont(this.parent.getDisplay(), height, SWT.NORMAL, font.getFontData()[0].getName());
boldFont = FontFactory.getFont(this.parent.getDisplay(), height, SWT.BOLD, boldFont.getFontData()[0].getName());
italicFont = FontFactory.getFont(this.parent.getDisplay(), height, SWT.ITALIC, italicFont.getFontData()[0].getName());
underlineFont = FontFactory.getFont(this.parent.getDisplay(), height, SWT.UNDERLINE_LINK, underlineFont.getFontData()[0].getName());
boldAndItalicFont = FontFactory.getFont(this.parent.getDisplay(), height, SWT.ITALIC|SWT.BOLD, boldAndItalicFont.getFontData()[0].getName());
return this;
}

Expand Down

0 comments on commit 3b0225a

Please sign in to comment.