Hi i made some small improvements to allow select italic and/or bold font.
Small patch is attached.
But i dont know how to get encoding information from QT3. You can write it
by hand (default is set to iso8859-2), but it is not ideal solution.
If anyone know how get this information from QT3 please mail me.
MOJE
--
Tomas Konir
Brno
ICQ 25849167
--- avifile-0.6/player/configdialog_impl.cpp 2002-05-02 23:05:00.000000000 +0200
+++ avifile-0.6-moje/player/configdialog_impl.cpp 2002-05-06 00:33:41.000000000
++0200
@@ -362,14 +362,26 @@
#if QT_VERSION >= 300
char str[250];
char str1[250];
- str[0]=0;
- str1[0]=0;
+ char wght[32];
+ char slant[]="r";
+ char encoding[32];
+
+ str[0]=0; str1[0]=0; wght[0]=0; encoding[0]=0;
+ if(m_defFont.weight()<26) strcat(wght,"light");
+ else if(m_defFont.weight()<51) strcat(wght,"medium");
+ else if(m_defFont.weight()<64) strcat(wght,"demibold");
+ else if(m_defFont.weight()<76) strcat(wght,"bold");
+ else strcat(wght,"black");
+ if(m_defFont.italic()) slant[0]='i';
sprintf(str1,"%s",m_defFont.family().ascii());
if (strchr(str1,'['))
str1[(strchr(str1,'[')-str1)-1]=0;
- sprintf(str,"-*-%s-*-r-*-*-*-%d-*-*-*-*-iso8859-2",
+ sprintf(str,"-*-%s-%s-%s-*-*-*-%d-*-*-*-*-iso8859-2",
str1,
- m_defFont.pointSize()*10);
+ wght,
+ slant,
+ m_defFont.pointSize()*10
+ );
p->Set(IAviPlayer::SUBTITLE_FONT, str, 0);
#else