2009-10-09 2 views
3

없는 표준 글꼴 (VB.NET)에 : 굴림이 예상된다충돌로 인해 우리의 자동 충돌 보고서 시스템이 충돌 이런 종류의 더 많은 보고서에 보내기 시작했다

System::Windows::Forms::Application::ThreadException event occured 
SENDER: System.Threading.Thread 

EXCEPTION: System.ArgumentException 
MESSAGE: Font 'Arial' does not support style 'Regular'. 
SOURCE: System.Drawing 
CALL STACK 
    at System.Drawing.Font.CreateNativeFont() 
    at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont) 
    at System.Drawing.Font..ctor(FontFamily family, Single emSize) 
    at Kernel.EH_FontServer.CreateFont(String family, Single size, FontStyle style) in ** 
    at Kernel.EH_FontServer..cctor() in ** 

내가 인상이었다 글꼴을 찾을 수없는 경우 Windows는 존재하는 다른 글꼴 + 스타일로 되돌아갑니다.

이 문제를 해결하는 올바른 방법은 무엇입니까? 내 애플 리케이션은 다른 디스플레이 요소에 대한 표준 글꼴의 번호를 정의해야합니다. 지금까지 저는 Arial, Courier New, Comic Sans Serif, Times New Roman을 하드 코드했습니다. 그리고 나는 그들 모두에 대한 충돌보고를 받고 있습니다.

사용자가 누락 된 글꼴을 설치하면 모두 정상입니다.

답변

2

이 문제를 피하는 한 가지 방법은 글꼴을 응용 프로그램에 직접 포함시키는 것입니다.

라이선스 사양이 읽기 : 굴림 같은 핵심 TTF 폰트는 라이선스 관점에서 괜찮을해야

http://www.tek-tips.com/faqs.cfm?fid=4747 
+1

: VB.NET 응용 프로그램에 글꼴을 포함하는 방법

http://www.microsoft.com/typography/RedistributionFAQ.mspx 

감사합니다 닛산 팬, 좋은 해결책 인 것 같습니다. –