Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Commit

Permalink
Update lyric.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Jun 23, 2024
1 parent 6b08ad4 commit 802748e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion patch/lyric/lyric.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "lyric.h"
#include "lyric.h"
#include "OverlayLyric.h"

HLRC CreateLyric(int type)
Expand Down Expand Up @@ -36,6 +36,10 @@ void SetLyricFontA(HLRC lrc, const char* fontName, float fontSize)
void SetLyricFontW(HLRC lrc, const wchar_t* fontName, float fontSize)
{
OverlayLyric* pLrc = (OverlayLyric*)lrc;

::FontFamily fontFamily(fontName);
if(!fontFamily.IsAvailable())
fontName=L"宋体";
pLrc->SetFont(fontName, fontSize);
}

Expand Down

0 comments on commit 802748e

Please sign in to comment.