Skip to content

Commit

Permalink
Added new RFC 8081 font mimetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
bjakja committed Oct 8, 2019
1 parent 3d677a9 commit 5dc9266
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 29 deletions.
30 changes: 15 additions & 15 deletions Kainote.sln
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KaiNote", "Kaiplayer\Kaipla
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuaBins", "Thirdparty\luabins\LuaBins\LuaBins.vcxproj", "{AF5CD8A9-C5DC-4780-BA28-5ED5EF9A3536}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuaJit", "Thirdparty\luajit\LuaJit\LuaJit.vcxproj", "{BA804678-E98B-4026-8D33-A8C5263C669E}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuaJit", "Thirdparty\LuaJIT\LuaJit\LuaJit.vcxproj", "{BA804678-E98B-4026-8D33-A8C5263C669E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuaJitBuild", "Thirdparty\luajit\LuaJitBuild\LuaJitBuild.vcxproj", "{F6C48ACA-C78D-450F-8059-010BBBA12137}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuaJitBuild", "Thirdparty\LuaJIT\LuaJitBuild\LuaJitBuild.vcxproj", "{F6C48ACA-C78D-450F-8059-010BBBA12137}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Minilua", "Thirdparty\luajit\Minilua\Minilua.vcxproj", "{325D093D-826B-4A7D-83C7-1CAD22911B9F}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Minilua", "Thirdparty\LuaJIT\Minilua\Minilua.vcxproj", "{325D093D-826B-4A7D-83C7-1CAD22911B9F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Icu", "Thirdparty\Icu\Icu\Icu.vcxproj", "{875E0BB7-06E8-4570-8E3C-AE9EF88F38BB}"
EndProject
Expand Down Expand Up @@ -322,10 +322,10 @@ Global
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX|Win32.Build.0 = Release|Win32
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX|x64.ActiveCfg = Release|x64
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX|x64.Build.0 = Release|x64
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX2|Win32.ActiveCfg = Rel_AVX2|Win32
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX2|Win32.Build.0 = Rel_AVX2|Win32
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX2|x64.ActiveCfg = Rel_AVX2|x64
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX2|x64.Build.0 = Rel_AVX2|x64
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX2|Win32.ActiveCfg = Release|Win32
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX2|Win32.Build.0 = Release|Win32
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX2|x64.ActiveCfg = Release|x64
{BA804678-E98B-4026-8D33-A8C5263C669E}.Rel_AVX2|x64.Build.0 = Release|x64
{BA804678-E98B-4026-8D33-A8C5263C669E}.Release log|Win32.ActiveCfg = Release|Win32
{BA804678-E98B-4026-8D33-A8C5263C669E}.Release log|Win32.Build.0 = Release|Win32
{BA804678-E98B-4026-8D33-A8C5263C669E}.Release log|x64.ActiveCfg = Release|x64
Expand Down Expand Up @@ -390,10 +390,10 @@ Global
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX|Win32.Build.0 = Release|Win32
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX|x64.ActiveCfg = Release|x64
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX|x64.Build.0 = Release|x64
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX2|Win32.ActiveCfg = Rel_AVX2|Win32
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX2|Win32.Build.0 = Rel_AVX2|Win32
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX2|x64.ActiveCfg = Rel_AVX2|x64
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX2|x64.Build.0 = Rel_AVX2|x64
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX2|Win32.ActiveCfg = Release|Win32
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX2|Win32.Build.0 = Release|Win32
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX2|x64.ActiveCfg = Release|x64
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Rel_AVX2|x64.Build.0 = Release|x64
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Release log|Win32.ActiveCfg = Release|Win32
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Release log|Win32.Build.0 = Release|Win32
{F6C48ACA-C78D-450F-8059-010BBBA12137}.Release log|x64.ActiveCfg = Release|x64
Expand Down Expand Up @@ -458,10 +458,10 @@ Global
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX|Win32.Build.0 = Release|Win32
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX|x64.ActiveCfg = Release|x64
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX|x64.Build.0 = Release|x64
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX2|Win32.ActiveCfg = Rel_AVX2|Win32
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX2|Win32.Build.0 = Rel_AVX2|Win32
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX2|x64.ActiveCfg = Rel_AVX2|x64
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX2|x64.Build.0 = Rel_AVX2|x64
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX2|Win32.ActiveCfg = Release|Win32
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX2|Win32.Build.0 = Release|Win32
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX2|x64.ActiveCfg = Release|x64
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Rel_AVX2|x64.Build.0 = Release|x64
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Release log|Win32.ActiveCfg = Release|Win32
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Release log|Win32.Build.0 = Release|Win32
{325D093D-826B-4A7D-83C7-1CAD22911B9F}.Release log|x64.ActiveCfg = Release|x64
Expand Down
4 changes: 2 additions & 2 deletions Kaiplayer/Kaiplayer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ git rev-parse --abbrev-ref HEAD &gt;&gt; gitparams.h</Command>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Thirdparty\zlib-1.2.8;..\Thirdparty\Hunspell\src\hunspell;..\Thirdparty\wxWidgets\include;c:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include;..\Thirdparty\BaseClasses;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include;..\Thirdparty\luabins\include;..\Thirdparty\luajit\include;..\Thirdparty\wxWidgets\lib\vc_lib\mswud;..\Thirdparty\boost_1_61_0;..\Thirdparty\icu\source\i18n;..\Thirdparty\icu\source\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\Thirdparty\zlib-1.2.8;..\Thirdparty\Hunspell\src\hunspell;..\Thirdparty\wxWidgets\include;c:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include;..\Thirdparty\BaseClasses;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include;..\Thirdparty\luabins\include;..\Thirdparty\luajit\src;..\Thirdparty\wxWidgets\lib\vc_lib\mswud;..\Thirdparty\boost_1_61_0;..\Thirdparty\icu\source\i18n;..\Thirdparty\icu\source\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;__WXMSW__;_WINDOWS;_DEBUG;__WXDEBUG__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
Expand Down Expand Up @@ -432,7 +432,7 @@ git rev-parse --abbrev-ref HEAD &gt;&gt; gitparams.h</Command>
</ResourceCompile>
<Link>
<AdditionalDependencies>kernel32.lib;user32.lib;usp10.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;core.lib;base.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregex.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;luaJit.lib;luaBins.lib;d3d9.lib;D3dx9.lib;ffms2_x64.lib;strmbase.lib;Boost.lib;libhunspell.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>c:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;c:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.1A\Lib\x64;..\Thirdparty\BaseClasses\x64\Release;..\Thirdparty\wxWidgets\build\msw\x64\Release;..\Thirdparty\Hunspell\msvc\x64\Release\libhunspell;..\Thirdparty\luabins\LuaBins\x64\Release;..\Thirdparty\luajit\LuaJit\x64\Release;..\Thirdparty\boost_1_61_0\BoostBuild\$(Platform)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>c:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;c:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.1A\Lib\x64;..\Thirdparty\BaseClasses\x64\Release;..\Thirdparty\wxWidgets\build\msw\x64\Release;..\Thirdparty\Hunspell\msvc\x64\Release\libhunspell;..\Thirdparty\luabins\LuaBins\x64\Release;..\Thirdparty\luajit\LuaJit\x64\$(Configuration);..\Thirdparty\boost_1_61_0\BoostBuild\$(Platform)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand Down
12 changes: 6 additions & 6 deletions Kaiplayer/MKVWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,14 +386,14 @@ std::map<int, wxString> MatroskaWrapper::GetFontList()

for(size_t i=0; i<count; i++)
{
wxString mimetype(atts[i].MimeType,wxConvUTF8);
if(mimetype== "application/x-truetype-font" || mimetype== "application/vnd.ms-opentype"){
attsname[i]=(wxString(atts[i].Name,wxConvUTF8));}
wxString mimetype(atts[i].MimeType, wxConvUTF8);
if (mimetype == "font/ttf" || mimetype == "font/otf" || mimetype == "application/x-truetype-font" || mimetype == "application/vnd.ms-opentype"){
attsname[i] = (wxString(atts[i].Name, wxConvUTF8));}
}
return attsname;
}

bool MatroskaWrapper::SaveFont(int id,const wxString &path, wxZipOutputStream *zip)
bool MatroskaWrapper::SaveFont(int id, const wxString &path, wxZipOutputStream *zip)
{

char *tmp = new char[atts[id].Length];
Expand All @@ -415,11 +415,11 @@ bool MatroskaWrapper::SaveFont(int id,const wxString &path, wxZipOutputStream *z
else
{
wxFile file;
file.Create(path,true,wxS_DEFAULT);
file.Create(path, true, wxS_DEFAULT);
if (file.IsOpened()){
file.Write(tmp, atts[id].Length);
file.Close();
}else{isgood=false;}
}else{ isgood=false; }

}
delete[] tmp;
Expand Down
10 changes: 6 additions & 4 deletions Kaiplayer/SubsGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ void SubsGrid::ContextMenu(const wxPoint &pos)
menu->SetAccMenu(Swap, _("Za&mień"))->Enable(isEnabled);
isEnabled = (sels >= 2 && sels <= 20);
menu->SetAccMenu(Join, _("Złącz &linijki"))->Enable(isEnabled);
isEnabled = (sels >= 2 && sels <= 50);
//maybe unblock it at all good to join lines of Aegisub Motion unneeded transitions
//there is nothing that can do mess in this case
isEnabled = (sels >= 2 && sels <= 500);
menu->SetAccMenu(JoinToFirst, _("Złącz linijki zostaw pierwszą"))->Enable(isEnabled);
menu->SetAccMenu(JoinToLast, _("Złącz linijki zostaw ostatnią"))->Enable(isEnabled);
isEnabled = (sels > 0);
Expand All @@ -199,7 +201,7 @@ void SubsGrid::ContextMenu(const wxPoint &pos)
menu->SetAccMenu(NewFPS, _("Ustaw nowy FPS"));
menu->SetAccMenu(FPSFromVideo, _("Ustaw FPS z wideo"))->Enable(Notebook::GetTab()->Video->GetState() != None && sels == 2);
menu->SetAccMenu(PasteTranslation, _("Wklej tekst tłumaczenia"))->Enable(subsFormat < SRT && ((TabPanel*)GetParent())->SubsPath != "");
menu->SetAccMenu(TranslationDialog, _("Okno przesuwania dialogów"))->Enable(showOriginal);
menu->SetAccMenu(TranslationDialog, _("Okno przesuwania dialogów"))->Enable(GetSInfo("TLMode Showtl") == L"Yes");
menu->AppendSeparator();

menu->SetAccMenu(RemoveText, _("Usuń tekst"))->Enable(isEnabled);
Expand Down Expand Up @@ -613,7 +615,7 @@ void SubsGrid::OnAccelerator(wxCommandEvent &event)
case FPSFromVideo: if (hasVideo && sels == 2){ OnSetFPSFromVideo(); } break;
case Join: if (sels > 1 && sels <= 20){ OnJoin(event); } break;
case JoinToFirst:
case JoinToLast: if (sels > 1 && sels <= 50){ OnJoinToFirst(id); } break;
case JoinToLast: if (sels > 1 && sels <= 500){ OnJoinToFirst(id); } break;
case HideSelected:
{
SubsGridFiltering filter(this, currentLine);
Expand Down Expand Up @@ -684,7 +686,7 @@ void SubsGrid::OnAccelerator(wxCommandEvent &event)
break;
}

if (id == TranslationDialog && showOriginal){
if (id == TranslationDialog && GetSInfo("TLMode Showtl") == L"Yes"){
static TLDialog *tld = new TLDialog(this, this);
tld->Show();
}
Expand Down
4 changes: 2 additions & 2 deletions Kaiplayer/VersionKainote.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
//StableReleaseLink: https://github.com/bjakja/Kainote/releases/download/v0.9.3.893/Kainote.x64.zip
//VersionKainoteX86: 0.9.3.910

#define VersionKainote "0.9.5.1100"
#define NumVersionKainote 0,9,5,1100
#define VersionKainote "0.9.5.1102"
#define NumVersionKainote 0,9,5,1102

0 comments on commit 5dc9266

Please sign in to comment.