mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
A little more on #7524
This commit is contained in:
parent
8ef07e56c2
commit
df73862a4f
@ -22,12 +22,15 @@
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=assa/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bouten/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Cuda/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Downloader/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ffmpeg/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ffprobe/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Fmpeg/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=furigana/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Immersive/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Imsc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Libre/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Matroska/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nikse/@EntryIndexedValue">True</s:Boolean>
|
||||
|
@ -48,7 +48,7 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
private static List<Paragraph> MakeHorizontalParagraphs(Paragraph p, int width, int height)
|
||||
{
|
||||
var lines = p.Text.SplitToLines();
|
||||
var adjustment = 34;
|
||||
const int adjustment = 34;
|
||||
var startY = height - lines.Count * 2 * adjustment + 30;
|
||||
if (p.Text.StartsWith("{\\an8", StringComparison.Ordinal))
|
||||
{
|
||||
@ -58,12 +58,12 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
var list = new List<Paragraph>();
|
||||
var furiganaList = new List<Paragraph>();
|
||||
var rubyOn = false;
|
||||
var italinOn = false;
|
||||
var italicOn = false;
|
||||
int startX;
|
||||
using (var g = Graphics.FromHwnd(IntPtr.Zero))
|
||||
{
|
||||
var actualText = NetflixImsc11Japanese.RemoveTags(HtmlUtil.RemoveHtmlTags(p.Text, true));
|
||||
var actualTextSize = g.MeasureString(actualText, new Font(SystemFonts.DefaultFont.FontFamily, 20));
|
||||
var actualTextSize = g.MeasureString(actualText, new Font("Arial", 13.8f)); // font size up, move text left
|
||||
startX = (int)(width / 2.0 - actualTextSize.Width / 2.0);
|
||||
if (p.Text.StartsWith("{\\an5", StringComparison.Ordinal))
|
||||
{
|
||||
@ -74,7 +74,7 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
for (var index = 0; index < lines.Count; index++)
|
||||
{
|
||||
var line = lines[index];
|
||||
if (italinOn)
|
||||
if (italicOn)
|
||||
{
|
||||
line = "<i>" + line;
|
||||
}
|
||||
@ -96,13 +96,13 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
{
|
||||
actual.Append("{\\i1}");
|
||||
i += 3;
|
||||
italinOn = true;
|
||||
italicOn = true;
|
||||
}
|
||||
else if (line.Substring(i).StartsWith("</i>", StringComparison.Ordinal) || line.Substring(i).StartsWith("</u>", StringComparison.Ordinal) || line.Substring(i).StartsWith("</b>", StringComparison.Ordinal))
|
||||
{
|
||||
actual.Append("{\\i0}");
|
||||
i += 4;
|
||||
italinOn = false;
|
||||
italicOn = false;
|
||||
}
|
||||
else if (line.Substring(i).StartsWith("<bouten-", StringComparison.Ordinal))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user