diff --git a/src/UglyToad.PdfPig.Fonts/TrueType/TrueTypeFont.cs b/src/UglyToad.PdfPig.Fonts/TrueType/TrueTypeFont.cs
index 201b424c..616a83aa 100644
--- a/src/UglyToad.PdfPig.Fonts/TrueType/TrueTypeFont.cs
+++ b/src/UglyToad.PdfPig.Fonts/TrueType/TrueTypeFont.cs
@@ -9,7 +9,7 @@
///
/// A TrueType font.
///
- public class TrueTypeFont
+ public sealed class TrueTypeFont
{
///
/// The font version number.
@@ -107,8 +107,12 @@
{
boundingBox = default(PdfRectangle);
- if (!TryGetGlyphIndex(characterCode, characterCodeToGlyphId, out var index)
- || TableRegister.GlyphTable == null)
+ if (TableRegister.GlyphTable == null)
+ {
+ return false;
+ }
+
+ if (!TryGetGlyphIndex(characterCode, characterCodeToGlyphId, out var index))
{
return false;
}
@@ -139,8 +143,12 @@
{
path = null;
- if (!TryGetGlyphIndex(characterCode, characterCodeToGlyphId, out var index)
- || TableRegister.GlyphTable == null)
+ if (TableRegister.GlyphTable == null)
+ {
+ return false;
+ }
+
+ if (!TryGetGlyphIndex(characterCode, characterCodeToGlyphId, out var index))
{
return false;
}
diff --git a/src/UglyToad.PdfPig/PdfFonts/CharacterBoundingBox.cs b/src/UglyToad.PdfPig/PdfFonts/CharacterBoundingBox.cs
index 7dbc57a4..881d2dee 100644
--- a/src/UglyToad.PdfPig/PdfFonts/CharacterBoundingBox.cs
+++ b/src/UglyToad.PdfPig/PdfFonts/CharacterBoundingBox.cs
@@ -5,7 +5,7 @@
///
/// Character bounding box.
///
- public class CharacterBoundingBox
+ public sealed class CharacterBoundingBox
{
///
/// The glyph bounds.
@@ -13,7 +13,7 @@
public PdfRectangle GlyphBounds { get; }
///
- /// THe width.
+ /// The width.
///
public double Width { get; }