Skip to content

Commit

Permalink
added kakuyomu emphasis css style
Browse files Browse the repository at this point in the history
  • Loading branch information
setsumi committed Jun 3, 2023
1 parent 72984d7 commit 6dbd1ea
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 14 deletions.
12 changes: 12 additions & 0 deletions src/syosetuDownloader/ChapterStyle.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
@charset "UTF-8";

/* bigger furigana */
rt {
font-size: .8em;
}

/* kakuyomu: emphasis furigana-like dots */
.emphasisDots > span {
padding: .35em 0;
background: url("emphasis-dots.png") no-repeat top center;
background-size: 3px 3px;
}
/* disable italic font */
.emphasisDots {
font-style: unset;
}
2 changes: 1 addition & 1 deletion src/syosetuDownloader/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public partial class MainWindow : Window
Shell32.Shell _shell;
string _exe_dir;
string _dl_dir;
readonly string _version = "2.4.0 plus 18";
readonly string _version = "2.4.0 plus 19";

public Util.GridViewTool.SortInfo sortInfo = new Util.GridViewTool.SortInfo();

Expand Down
Binary file added src/syosetuDownloader/emphasis-dots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions src/syosetuDownloader/format.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
;{0} = incrementing numbers
;{1} = chapter title
;{2} = series code (n******)
;Chapter {0} - {1} => Chapter 1 - Prolouge
;{0:D4} => 0001
;Reffer to https://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.100).aspx
;Chapter {0} - {1}
;{0} = incrementing numbers
;{1} = chapter title
;{2} = series code (n******)
;Chapter {0} - {1} => Chapter 1 - Prolouge
;{0:D4} => 0001
;Reffer to https://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.100).aspx
;Chapter {0} - {1}
{2}/{0:0000}-{1}
13 changes: 9 additions & 4 deletions src/syosetuDownloader/syosetuDownloader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,17 @@
<Resource Include="up.png" />
</ItemGroup>
<ItemGroup>
<Content Include="ChapterStyle.css">
<None Include="ChapterStyle.css">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="image-error.png">
</None>
<None Include="image-error.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="emphasis-dots.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
Expand Down
5 changes: 3 additions & 2 deletions src/syosetuDownloaderCore/Syousetsu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,9 @@ public static void SaveFile(Constants details, string[] chapter, int current)
new object[] { current, chapter[0], details.SeriesCode });

//File.WriteAllText(Path.Combine(path, "ChapterStyle.css"), "@charset \"UTF-8\";\n/*chapter css here*/\nrt{font-size:.8em;}");
File.Copy(Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "ChapterStyle.css"),
Path.Combine(path, "ChapterStyle.css"), true);
string exe_path = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
File.Copy(Path.Combine(exe_path, "ChapterStyle.css"), Path.Combine(path, "ChapterStyle.css"), true);
File.Copy(Path.Combine(exe_path, "emphasis-dots.png"), Path.Combine(path, "emphasis-dots.png"), true);
}

chapter[0] = String.Empty;
Expand Down

0 comments on commit 6dbd1ea

Please sign in to comment.