aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs b/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs
index c10084c9b..65212a315 100644
--- a/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs
+++ b/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs
@@ -1,6 +1,7 @@
-using System.Globalization;
-using ImageMagickSharp;
+using ImageMagickSharp;
+using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Drawing;
+using System.Globalization;
namespace MediaBrowser.Server.Implementations.Drawing
{
@@ -8,6 +9,13 @@ namespace MediaBrowser.Server.Implementations.Drawing
{
private const int OffsetFromTopRightCorner = 38;
+ private readonly IApplicationPaths _appPaths;
+
+ public UnplayedCountIndicator(IApplicationPaths appPaths)
+ {
+ _appPaths = appPaths;
+ }
+
public void DrawUnplayedCountIndicator(MagickWand wand, ImageSize imageSize, int count)
{
var x = imageSize.Width - OffsetFromTopRightCorner;
@@ -25,7 +33,7 @@ namespace MediaBrowser.Server.Implementations.Drawing
pixel.Opacity = 0;
pixel.Color = "white";
draw.FillColor = pixel;
- draw.Font = "Sans-Serif";
+ draw.Font = PlayedIndicatorDrawer.ExtractFont("robotoregular.ttf", _appPaths);
draw.FontStyle = FontStyleType.NormalStyle;
draw.TextAlignment = TextAlignType.CenterAlign;
draw.FontWeight = FontWeightType.RegularStyle;
@@ -36,7 +44,7 @@ namespace MediaBrowser.Server.Implementations.Drawing
if (text.Length == 1)
{
- x += 2;
+ x += 1;
}
else if (text.Length == 2)
{