Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
28th December 2006, 06:44 | #1201 | Link |
李姗倩 Lǐ Shān Qiàn
Join Date: Nov 2002
Posts: 1,340
|
Probably it has a name for windows, something like this
Code:
ITCFranklinGothic LT BookCn 12345678901234567890123456789012 0---------1---------2--------3-* |
28th December 2006, 14:28 | #1202 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
You can also try using the 8.3 filename. Every file in Windows is also accessable via a short filename.
__________________
MPC-HC 2.2.1 |
28th December 2006, 21:00 | #1203 | Link |
Registered User
Join Date: Mar 2005
Posts: 468
|
Well, all other applications have no problem handling fonts with facenames >31 characters.
I found a solution to the problem: using TransType Pro, the fontname (and other metadata) may be changed as an option in the conversion process. This process sucessfully worked around the problem, however, it is my opinion that the issue is with vsfilter, not the Windows in general, since no other applications crash on fonts with >31-char. fontnames. Last edited by Isochroma; 29th December 2006 at 03:57. |
29th December 2006, 01:11 | #1204 | Link |
李姗倩 Lǐ Shān Qiàn
Join Date: Nov 2002
Posts: 1,340
|
Your solution may be not proper. You can just use the right font name for Windows, which should be <= 31 char. What you need to do first is, to check the correct internal font name. Did you do that?
The fontname you are supposed to write in SSA/ASS's style is not necessarily equal to the name that is commonly known as the name of that font, nor file name (never. clisid .. A font file has a many names, like Postscript name or a name for Windows. You just need to use the name for Windows. If you upload the font file, I can check the correct font name within a few seconds, unless it's broken. Alternatively you can check it yourself by using the tool I mentioned. Like we are repeating, if you copy longer string when the buffer length is 32, obviously it causes crashes; but just to preventing that wouldn't fix the problem. Gabest could copy the first 31 characters only, and there were no crash, but then the font mapper wouldn't recognize the font name either. - The name font mapper needs to know is, NOT the first 31 characters, NOT the long name (postscript name?) you are trying to use, BUT the name for Windows. Its internal name. - What you need to do is, simply to use the correct internal name. First check the correct internal name. Even if the font may be commonly knows as "ITC Franklin Gothic LT Book Condensed" it's not the correct internal name you can use in your SSA/ASS script. It's a general name, name for common people. An advanced typesetter needs to know how to check the correct internal font name, because that is the only name SSA/ASS will recognize. And I alreaady told you how. |
29th December 2006, 03:51 | #1205 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
The obvious solution is to use comic sans and arial on all your subs, of course.
Here's the patch to fix the crash: Code:
Index: filters/transform/vsfilter/DirectVobSub.cpp =================================================================== --- filters/transform/vsfilter/DirectVobSub.cpp (revision 611) +++ filters/transform/vsfilter/DirectVobSub.cpp (working copy) @@ -231,9 +231,9 @@ if(lf) { if(lflen == sizeof(LOGFONTA)) - strcpy(((LOGFONTA*)lf)->lfFaceName, CStringA(m_defStyle.fontName)); + strncpy_s(((LOGFONTA*)lf)->lfFaceName, LF_FACESIZE, CStringA(m_defStyle.fontName), _TRUNCATE); else if(lflen == sizeof(LOGFONTW)) - wcscpy(((LOGFONTW*)lf)->lfFaceName, CStringW(m_defStyle.fontName)); + wcsncpy_s(((LOGFONTW*)lf)->lfFaceName, LF_FACESIZE, CStringW(m_defStyle.fontName), _TRUNCATE); else return E_INVALIDARG; Index: subtitles/STS.cpp =================================================================== --- subtitles/STS.cpp (revision 611) +++ subtitles/STS.cpp (working copy) @@ -2957,7 +2957,7 @@ LOGFONTA& operator <<= (LOGFONTA& lfa, STSStyle& s) { lfa.lfCharSet = s.charSet; - strcpy_s(lfa.lfFaceName, CStringA(s.fontName)); + strncpy_s(lfa.lfFaceName, LF_FACESIZE, CStringA(s.fontName), _TRUNCATE); HDC hDC = GetDC(0); lfa.lfHeight = -MulDiv((int)(s.fontSize+0.5), GetDeviceCaps(hDC, LOGPIXELSY), 72); ReleaseDC(0, hDC); @@ -2971,7 +2971,7 @@ LOGFONTW& operator <<= (LOGFONTW& lfw, STSStyle& s) { lfw.lfCharSet = s.charSet; - wcscpy_s(lfw.lfFaceName, CStringW(s.fontName)); + wcsncpy_s(lfw.lfFaceName, LF_FACESIZE, CStringW(s.fontName), _TRUNCATE); HDC hDC = GetDC(0); lfw.lfHeight = -MulDiv((int)(s.fontSize+0.5), GetDeviceCaps(hDC, LOGPIXELSY), 72); ReleaseDC(0, hDC); Good news! GDI is smart enough to figure out the correct font, even if the name gets truncated. (Unless you have multiple fonts that start with the same 31 letters, of course.) It's quite possible that in the meantime, you can just chop everything after 31 letters off and it won't crash, if you don't want to bother finding the internal GDI name. Try it! Last edited by foxyshadis; 29th December 2006 at 03:54. |
29th December 2006, 05:54 | #1207 | Link |
李姗倩 Lǐ Shān Qiàn
Join Date: Nov 2002
Posts: 1,340
|
Thanks for sending me the font as PM. This is what the font mapper on my win 2k recognizes:
Full Name=ITC Franklin Gothic LT Book Condensed: CharSet=0 (Western): lfFaceName=ITCFranklinGothic LT BookCn Full Name=ITC Franklin Gothic LT Book Condensed: CharSet=161 (Greek): lfFaceName=ITCFranklinGothic LT BookCn I think you can just use lfFaceName, without doing any hack. Code:
Style: SomeStyle,ITCFranklinGothic LT BookCn,36,&H00ffffff,0,0,0,0,0,0,0,100,100,0,0.00,1,1,1,2,20,20,15,0 Dialogue: 0,0:00:01.00,0:00:06.00,SomeStyle,Someone,0000,0000,0000,,Some text goes here. Is this what you want? Font Family name : ITCFranklinGothic LT BookCn Postscript name : FranklinGothicLT-BookCnd Unique font identifier : Linotype Library GmbH: ITC Franklin Gothic LT Book Condensed: 2002 Full font name : ITC Franklin Gothic LT Book Condensed The windows font mapper happens to say CharSet=0 or 161, but actually the version of the OS/2 table is 0, not having CharSet info. In such a situation, I'd recommend encoding=1 (DEFAULT_CHARSET) instead of 0 (ANSI_CHARSET) even if the actual CharSet is 0. Style: SomeStyle,ITCFranklinGothic LT BookCn,36,&H00ffffff,0,0,0,0,0,0,0,100,100,0,0.00,1,1,1,2,20,20,15,0 Style: SomeStyle,ITCFranklinGothic LT BookCn,36,&H00ffffff,0,0,0,0,0,0,0,100,100,0,0.00,1,1,1,2,20,20,15,1 |
30th December 2006, 03:26 | #1209 | Link |
Registered User
Join Date: Oct 2001
Posts: 68
|
man this thread's huge....
if only there was a separate category/forum for MPC stuff... found a bug in 6.4.9.0 in XP (SP2-Pro). It seems to happen when I set the "change full screen resolution" setting and have the deinterlace shader on. When it changes the mode with the shader enabled, MPC will crash. Also, is there a command-line switch to enable specific shaders by default? |
2nd February 2007, 13:24 | #1212 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
Drivers tend to be the source of such a problem, but it's hard to say. All the option does is reduce cpu/memory usage on the system and the card by doing some things in-place (and in yuv mode if chosen), normally improving performance to sacrifice a few features, but apparently not in your case.
|
9th February 2007, 17:00 | #1215 | Link |
Registered User
Join Date: Jul 2003
Posts: 43
|
Bug Report: When playing full screen, if user switches to another application using Alt+Tab, fullscreen status is lost.
This irritates me because sometimes I want to check something out in another program quickly and come back to MPC, but because of this bug I have to go fullscreen again manually everytime. |
9th February 2007, 17:32 | #1216 | Link |
李姗倩 Lǐ Shān Qiàn
Join Date: Nov 2002
Posts: 1,340
|
An application in the full-screen mode once has to exit from the full-screen mode in order for another app to be foreground. So that behavior is inevitable, and I assume that yours is a feature request "When another app gets focus when MPC is in the full-screen mode, I'd like MPC automatically to re-enter into the full-screen mode when it regains the focus." I'm not sure if that is really a good idea, but I understand your needs as well.
|
11th February 2007, 16:08 | #1217 | Link |
Registered User
Join Date: Aug 2005
Posts: 54
|
Not always.
When you change focus by clicking on a second (or third, etc) monitor sometimes MPC doesn't lose focus. Also, there are many applications that do not exit full screen status when alt-tabbed. I am another who thinks this would be a neat idea. Lastly, I didn't realise it when I posted a couple of days ago, but this seems to be a 'generic' MPC bug report thread? If so, I hope it's not too much trouble for me to link to my 'problem' thread: http://forum.doom9.org/showthread.php?t=122032 Regarding the inbult MPEG splitter, and subtitle stream handling. Thanks for your time. |
2nd March 2007, 19:53 | #1219 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
The last change to MPC was 9 months ago. So it is possible there will never be a next version.
__________________
MPC-HC 2.2.1 |
Tags |
media player classic |
|
|