From b03222687062407bfeb630355d6e0e87202bf145 Mon Sep 17 00:00:00 2001 From: niksedk Date: Mon, 16 Aug 2021 21:09:59 +0200 Subject: [PATCH] ASSA resamble - add outline width, shadow width and spacing - thx Samo99 :) Related to https://github.com/SubtitleEdit/subtitleedit/issues/5259#issuecomment-899734100 in #5259 --- src/ui/Forms/Assa/ResolutionResampler.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ui/Forms/Assa/ResolutionResampler.cs b/src/ui/Forms/Assa/ResolutionResampler.cs index facd9c8b5..32c428e4a 100644 --- a/src/ui/Forms/Assa/ResolutionResampler.cs +++ b/src/ui/Forms/Assa/ResolutionResampler.cs @@ -156,7 +156,18 @@ namespace Nikse.SubtitleEdit.Forms.Assa style.MarginRight = AssaResampler.Resample(sourceWidth, targetWidth, style.MarginRight); style.MarginVertical = AssaResampler.Resample(sourceHeight, targetHeight, style.MarginVertical); } - style.FontSize = AssaResampler.Resample(sourceHeight, targetHeight, style.FontSize); + + if (fixFonts) + { + style.FontSize = AssaResampler.Resample(sourceHeight, targetHeight, style.FontSize); + } + + if (fixFonts || fixDraw) + { + style.OutlineWidth = (decimal)AssaResampler.Resample(sourceHeight, targetHeight, (float)style.OutlineWidth); + style.ShadowWidth = (decimal)AssaResampler.Resample(sourceHeight, targetHeight, (float)style.ShadowWidth); + style.Spacing = (decimal)AssaResampler.Resample(sourceWidth, targetWidth, (float)style.Spacing); + } } _subtitle.Header = AdvancedSubStationAlpha.GetHeaderAndStylesFromAdvancedSubStationAlpha(_subtitle.Header, styles);