diff --git a/src/UglyToad.PdfPig/Content/Letter.cs b/src/UglyToad.PdfPig/Content/Letter.cs
index 81dc1d8c..5380aeba 100644
--- a/src/UglyToad.PdfPig/Content/Letter.cs
+++ b/src/UglyToad.PdfPig/Content/Letter.cs
@@ -87,6 +87,10 @@
{
if (System.Math.Abs(StartBaseLine.Y - EndBaseLine.Y) < 10e-5m)
{
+ if (StartBaseLine.X > EndBaseLine.X)
+ {
+ return TextDirection.Rotate180;
+ }
return TextDirection.Horizontal;
}
else if (System.Math.Abs(StartBaseLine.X - EndBaseLine.X) < 10e-5m)
diff --git a/src/UglyToad.PdfPig/Content/TextDirection.cs b/src/UglyToad.PdfPig/Content/TextDirection.cs
index 239e2233..0c56a942 100644
--- a/src/UglyToad.PdfPig/Content/TextDirection.cs
+++ b/src/UglyToad.PdfPig/Content/TextDirection.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace UglyToad.PdfPig.Content
+namespace UglyToad.PdfPig.Content
{
///
/// Direction of the text.
@@ -19,6 +15,11 @@ namespace UglyToad.PdfPig.Content
///
Horizontal,
+ ///
+ /// Horizontal text, upside down.
+ ///
+ Rotate180,
+
///
/// Rotated text going down.
///