aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Drawing.Skia
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2023-05-22 22:48:09 +0200
committerBond_009 <bond.009@outlook.com>2023-06-28 17:07:57 +0200
commitb5f0760db8dba96e9edd67d4b9c914cf25c3d26a (patch)
treea60f87f379ddbfe2436d03b3b1a8f48cbc3b7490 /src/Jellyfin.Drawing.Skia
parentf954dc5c969ef5654c31bec7a81b0b92b38637ae (diff)
Use RegexGenerator where possible
Diffstat (limited to 'src/Jellyfin.Drawing.Skia')
-rw-r--r--src/Jellyfin.Drawing.Skia/StripCollageBuilder.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Jellyfin.Drawing.Skia/StripCollageBuilder.cs b/src/Jellyfin.Drawing.Skia/StripCollageBuilder.cs
index a7a3338df..537fbf236 100644
--- a/src/Jellyfin.Drawing.Skia/StripCollageBuilder.cs
+++ b/src/Jellyfin.Drawing.Skia/StripCollageBuilder.cs
@@ -123,8 +123,7 @@ public partial class StripCollageBuilder
var typeFace = SKTypeface.FromFamilyName("sans-serif", SKFontStyleWeight.Bold, SKFontStyleWidth.Normal, SKFontStyleSlant.Upright);
// use the system fallback to find a typeface for the given CJK character
- var nonCjkPattern = @"[^\p{IsCJKUnifiedIdeographs}\p{IsCJKUnifiedIdeographsExtensionA}\p{IsKatakana}\p{IsHiragana}\p{IsHangulSyllables}\p{IsHangulJamo}]";
- var filteredName = Regex.Replace(libraryName ?? string.Empty, nonCjkPattern, string.Empty);
+ var filteredName = NonCjkPatternRegex().Replace(libraryName ?? string.Empty, string.Empty);
if (!string.IsNullOrEmpty(filteredName))
{
typeFace = SKFontManager.Default.MatchCharacter(null, SKFontStyleWeight.Bold, SKFontStyleWidth.Normal, SKFontStyleSlant.Upright, null, filteredName[0]);