성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
[정성태] 저렇게 조각 코드 말고, 실제로 재현이 되는 예제 프로젝트를 압...
[정성태] Modules 창(Ctrl+Shift+U)을 띄워서, 해당 Op...
[정성태] 만드실 수 있습니다. 단지, Unity 엔진 내의 스크립트와 W...
[공진영] 안녕하세요 좋은글 감사합니다. 현재 제가 wpf로 관제 모...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <br /> <div style='font-family: 맑은 고딕, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>WPF - Arial Narrow 폰트 문제</div><br /> <br /> 요즘 진행하고 있는 프로젝트에서, 예기치 않은 문제가 발생했습니다.<br /> <br /> 먼저, Windows Form 응용 프로그램에서의 Arial 폰트와 Arial Narrow 폰트를 비교해 보면,<br /> <br /> [그림 1: Arial 폰트 비교 - Windows Form]<br /> <img alt='wpf_arial_narrow_font_issue_1.PNG' src='/SysWebRes/bbs/wpf_arial_narrow_font_issue_1.PNG' /><br /> <br /> 정상적으로 나오는 것을 확인할 수 있습니다. 그런데, WPF에서는 다음과 같이 Narrow로 지정된 모양이 "Bold Italic"으로 적용되어 나오는 것을 볼 수 있습니다.<br /> <br /> [그림 2: Arial 폰트 비교 - WPF]<br /> <img alt='wpf_arial_narrow_font_issue_2.PNG' src='/SysWebRes/bbs/wpf_arial_narrow_font_issue_2.PNG' /><br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="168" Width="272"> <Grid> <StackPanel> <Label <b style='color: Blue;'>FontFamily="Arial"</b> FontSize="18">Arial Normal Font</Label> <Label <b style='color: Blue;'>FontFamily="Arial Narrow"</b> FontSize="18">Arial Font Narrow</Label> </StackPanel> </Grid> </Window> </pre> <br /> <br /> WPF 프레임워크 단에서 그런 처리를 해주니 어쩔 수 없는 문제인데, <a target='_tab' href='https://connect.microsoft.com/'>connect</a> 사이트에도 이와 관련된 피드백이 올라와 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > WPF 피드백 - Font mapper incorrect results with Arial Narrow ; <a target='_tab' href='https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=343874&SiteID=212'>https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=343874&SiteID=212</a> </pre> <br /> 패치 등을 통한 직접적인 해결 방법은 제공되지 않고 있으며, 단지 RenderTransform을 통한 우회 방법만이 "Steve1105"라는 계정을 쓰는 사람에 의해서 제공되고 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > 우회 해결 방법 ; <a target='_tab' href='https://connect.microsoft.com/feedback/Workaround.aspx?FeedbackID=343874&SiteID=212'>https://connect.microsoft.com/feedback/Workaround.aspx?FeedbackID=343874&SiteID=212</a> </pre> <br /> 위의 WPF 코드를 RenderTransform을 이용하면 다음과 같습니다.<br /> <br /> [그림 3: RenderTransform을 이용하여 흉내낸 Arial Narrow 폰트]<br /> <img alt='wpf_arial_narrow_font_issue_3.PNG' src='/SysWebRes/bbs/wpf_arial_narrow_font_issue_3.PNG' /><br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; width: 800px; background-color: #fbedbb; overflow-x: scroll; font-family: Consolas, Verdana;' > <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="168" Width="272"> <Grid> <StackPanel> <Label FontFamily="Arial" FontSize="18">Arial Normal Font</Label> <b style='color: Blue;'> <Label FontFamily="Arial" FontSize="18" Content="Arial Narrow Font"> <Label.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="0.8"/> </TransformGroup> </Label.RenderTransform> </Label></b> </StackPanel> </Grid> </Window> </pre> <br /> <br /><br /><hr /><span style='color: Maroon'>[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1050
(왼쪽의 숫자를 입력해야 합니다.)