fontspec fontspec 이주호국회예산정책처 latex.juho@gmail.com fontspec
차례 1 들어가며 2 Font 선택 3 폰트에구애받지않는특성 4 폰트에따라좌우되는특성 5 다국어조판 6 맺으며
TEX 에서폰트를사용한다는것 갖춰야할게많다. (map, vf, tfm, fd, ) CJK 사용자는더욱힘들다. ( 은바탕의경우 tfm 만 1,000 개이상 ) 폰트를이해하면 TEX 이보인다고할정도. X TEX 의등장 사용자가사용할수있는폰트선택의폭을넓히는계기 E 폰트남용주의!
fontspec 패키지의등장 X TEX 의폰트지정방식 E \font\tenrm= Times New Roman/B:Le er Case=Small Caps at 10pt Plain TEX 명령과닮아어려운가?. fontspec 패키지나가신다 Type1/ TrueType/ OpenType 등원하는폰트를직관적으로쉽게지정폰트의고급속성구현 AAT (Apple Advanced Typography)/ Opentype ICU Renderer 합자 (liglature), 커닝, 대소문자, 숫자모양, 글리프대체 (Swash, Contextual, Variant, Alternate 등 )
패키지불러오기 \usepackage{fontspec} 같이쓰면좋은패키지 \usepackage{xunicode} \usepackage{xltxtra} 패키지옵션 cm-default Latin Modern 폰트대신 Computer Modern 사용 no-math 수식폰트를바꾸지않음 no-con g fontspec.cfg를얹지않음 quiet 컴파일할때폰트경고 (warning) 를보여주지않음. 단 log에는기록 silent warning도없고 log에도기록하지않음
기본사용법. \fontspec 명령을직접쓰는경우 \fontspec[ligatures=common]{arno Pro} office scal sufficient ow shuffle \fontspec[numbers=oldstyle,scale=matchlowercase]{minion Pro} 12345 Boys Be the TEXnician! Boys! \fontspec[numbers=lining,mapping=textext]{minion Pro} 12345 Boys G\ othe 2010--2015 12345 Boys Göthe 2010 2015
대표글꼴지정 \setmainfont[ 폰트속성 ]{ 폰트이름 } 본문바탕 (serif) 글꼴가족 (\let\setmainfont\setromanfont) \setsansfont[ 폰트속성 ]{ 폰트이름 } 본문돋음 (sans serif) 글꼴가족 \setmonofont[ 폰트속성 ]{ 폰트이름 } 고정폭 (mono-spaced) 글꼴가족. 이자료의대표글꼴설정 \setsansfont[scale=matchlowercase,mapping=tex-text]{myriad Pro} \setmainfont[mapping=tex-text]{arno Pro} \setmonofont[scale=matchlowercase,mapping=tex-text]{tekton Pro}
번외글꼴지정 \newfontfamily\ 사용할이름 [ 폰트속성 ]{ 폰트이름 } 대표글꼴외에본문에서줄기차게사용할글꼴가족 \newfontface[ 폰트속성 ]{ 폰트이름 } 대표글꼴외에본문에서사용할글꼴 (only one!) (\let\newfontface\newfontinstance). 번외글꼴지정 \newfontfamily\footnotefont[ligatures=rare,mapping=tex-text]{adobe Garamond Pro} \newfontface\lovele erfont[ligatures=rare,mapping=tex-text]{zapfino Forte Lt Pro}
폰트이름은어떻게적나? 시스템폰트폴더 (C:\windows\fonts) 에서보이는글꼴이름그렇게적어도안나올때 : ExternalLocation 옵션을주고폰트파일이름 Figure: Font Properties Extensions
Scale \fontspec{- 파랑새 L} 사나이가슴에불을질러 \\ \fontspec[scale=.7]{- 파랑새 L} 사나이가슴에불을질러 \\ 사나이가슴에불을질러 \fontspec[scale=1.21]{-파랑새l} 사나이가슴에불을질러 \newfontface\originalhelvetica{helvetica Neue} \newfontface\scaledhelvetica[scale=matchlowercase]{helvetica Neue} See the \HL{\OriginalHelvetica See the baseline} Baseline\\ See the \HL{\ScaledHelvetica See the baseline} Baseline 사나이가슴에불을질러 사나이가슴에불을질러 See the Silly Size See the Silly Size MatchUppercase/ MatchLowercase 는본문 roman 폰트의높낮이에맞춤
Color \fontspec[color=ff0022]{-파랑새l} Hex RGB 컬러 \\ \fontspec[color=0000ff]{-파랑새l} 16진수값두개씩세쌍을지정 \\ \fontspec[colour=00bb33]{-파랑새l} Color=Colour} Hex RGB 컬러 16 진수값두개씩세쌍을지정 Color=Colour 반짝질문 Color 에직접색상, 예를들어 SteelBlue 따위를지정하면어떻게될까?
Mapping, Interword & Letter Space. Mapping Mapping=tex-text: tex 입력방식을유지시켜줌 quotation 2010--2015 G\ othe quotation 2010 2015 Göthe. Interword & Letter Space WordSpace={0.8,0.5,0.5} 단어간격 Le erspace={2.0} 글자간격 세심한주의를기울여야할대목. 한글은 X TEX-ko에서기본으로제공하는값을존중하자. E
숫자모양 \newfontface\oldpropfigure[numbers={oldstyle,proportional}]{minion Pro} \newfontface\liningprofigure[numbers={lining,proportional}]{minion Pro} \newfontface\oldmonofigure[numbers={oldstyle,monospaced}]{minion Pro} \newfontface\liningmonofigure[numbers={lining,monospaced}]{minion Pro} \newfontface\slashedzerofigure[numbers={slashedzero}]{minion Pro} old style (lowercase) lining (uppercase) proportional 0123456789 0123456789 mono spaced 0123456789 0123456789 slashed Zero 0123456789
Alternate \multido{\i=0+1}{15}{\fontspec[scale=.7,rawfeature={+aalt=\i}]{adobe 명조 Std}% 123456789\qquad}. 하나의 character 에대해여러 glyph 를대응시켜심어넣은것 Alternate 옵션은자연수 0 부터순차적으로증가
Alternate ( 계속 ) \multido{\i=0+1}{5}{% \fontspec[alternate=\i]{civilite MJ Std} \i. \textcolor{green}{h}ous\textcolor{steelblue}{e} \qquad \textcolor{green}{l}in \textcolor{steelblue}{e}\qquad \textcolor{green}{w}i\textcolor{steelblue}{n} \par} 0. ou i i 1. ou i i 2. ou in in 3. ou lin in 4. hou e line in Alternate는모든폰트에있나요? 그렇지않아요. Alternate는몇개까지있나요? 폰트마다글리프마다달라요.
Variants \fontspec{zapfino Extra LT Pro} \LARGE \multido{\i=1+1}{10}{\i. Pink \textcolor{green}% {\fontspec[variant=\i]{zapfino Extra LT Pro}f}loy% \textcolor{steelblue}{\fontspec[variant=\i]% {Zapfino Extra LT Pro}d}\qquad} 1. Pink floyd 2. Pink loy 3. Pink loy 4. Pink loy 5. Pink loy 6. Pink floy 7. Pink floy 8. Pink floy 9. Pink floy 10. Pink floy. 하나의 character에대해여러 glyph를대응시켜심어넣은것 Variant 옵션은자연수 1부터순차적으로증가 Alternate랑뭐가달라? Variant는모든폰트에있나요? 그렇지않아요. Variant 는몇개인가요? 폰트마다글리프마다달라요.
한글폰트의경우 Figure: 윤봄날 ( 가변 ). from 윤디자인 이외에도산돌, 폰트릭스등의글꼴
Transparent Color \fontsize{12}{12} \fontspec{hoeflertext-regularitalicswash} {\addfontfeature{color=00ff0044,% Scale=4, Alternate=1}Q}\kern-4ex {\addfontfeature{color=ff000033,% Scale=8, Alternate=1}Q}\kern-8ex {\addfontfeature{color=0000ff22,% Scale=12, Alternate=1}Q}\kern-16ex QQQQQ Figure: from Beauty of L A TEX 16진수값 (00 FF) 세쌍, 각각 RGB 지정 (e.g. 00FF00) 마지막 16진수쌍은투명도의범위를지정 00 완전투명, FF 완전불투명 안타깝게도 Mac에서만가능
Swash \fontspec{warnock Pro} \itshape \HL{WinEdt} 만기억하는 OOO 세상 \\ \fontspec[contextuals=swash]{warnock Pro} \itshape \HL{WinEdt} 만기억하는 OOO 세상 (Contextual Swashes) \fontspec{warnock Pro} \itshape \HL{M}ik\TeX만설치하는 OOO 세상 \\ \fontspec[contextuals=swash]{minion Pro} \itshape \HL{M}i\HL{k}\HL[OrangeRed]{\TeX} 만 \\ \fontspec[style=swash]{minion Pro} \itshape \HL{M}i\HL{k}\HL[OrangeRed]{\TeX} 만 WinEdt 만기억하는 OOO 세상 in d 만기억하는 OOO 세상 ( ontextua washes) MikTEX 만설치하는 OOO 세상 ik 만 ik 만 스와시 (swash) 는우리말로적절히번역하기곤란 이탤릭체 variant 의한종류
Ligature \fontspec[mapping=tex-text]{minion Pro} \begin{description} \item[no] {\addfontfeature{ligatures=nocommon} office flower fiscal often} % 리거처없음 No office flower fiscal often Common office ower ord \item[common] \addfontfeature{ligatures=common} o en o\hl{ffi}ce \HL{fl}ower \HL{ }ord o\hl{ft}en % 보통리거처 Rare office ower scal \item[rare] \addfontfeatures{ligatures=rare} o en introdu ion o\hl{ffi}ce \HL{fl}ower \HL{fi}scal o\hl{ft}en student introdu\hl[orangered]{ct}ion ( Rare는 Discretionary 와같은의미 ) \HL[OrangeRed]{st}udent % 희귀한리거처 \end{description}
Ligature ( 계속 ) \fontspec[mapping=tex-text]{linux Libertine O} tz ct st h \& \addfontfeature{ligatures=common} tz ct st h\& Linuxe Libertine \addfontfeature{ligatures=rare} tz ct st h\& tz ct st h & \addfontfeature{ligatures=historical} tz ct st h \& tz ct st h& (Ligatures=Common) ct st h& \addfontfeature{alternate=0} tz ct st h \& st h & (Ligatures=Historical) \addfontfeature{alternate=1} tz ct st h \& st (Alternate=0) st (Alternate=1) {\newhangulfontface\rarehangulliga[ligatures=rare]% {Adobe 명조 Std} \RareHangulLiga 주식회사 \disablehangulspacingandlinebreak \RareHangulLiga 주식회사 }
the Looooooongest Ligature \fontspec[ligatures=rare,mapping=tex-text] {RequiemText-HTF-Italic} % fffl 이 period로찍힐것임. % Requiem Italic 폰트에해당리거처가없기때문 Sauerstoffflasche % fffl 만 Requiem ItalicLigs 폰트로변경 \addfontfeatures{mapping=fffl-text} Sauersto\HL{\fontspec[Mapping=fffl-text] {RequiemText-HTF-ItalicLigs}fffl}asche Sauersto\HL{\fontspec{RequiemText-HTF -ItalicLigs}.}asche fffl이제대로찍히도록해보자. 다음내용으로 fffl-text.map 생성 LHSName fffl-text pass(unicode) U+0066 U+0066 U+0066 U+006C <> U+002E ; fffl X TEX 에서인식할수있도록명령행에서컴파일 E > teckit_compile fffl-text.map Sauerstoffflasche Sauer o.asche Sauer o.asche
Ligature ( 계속 ) Figure: Hoe er Requiem Italic 의다양한 Ligatures
Glyph Palette Figure: Adobe Illustrator CS4
Glyph Palette ( 계속 ) Figure: Adobe InDesign CS4
세계의문자체계 Figure: World Writing System from Wikipedia
타이어 Script=Thai \newfontfamily{\thaiwrongfont}[scale=1.2]{adobe Thai} \newfontfamily{\thaifont}[script=thai,scale=1.2]{adobe Thai} \Thaiwrongfont ในว นท เธออย ใกล ฉ น ช างเป นว นท แสนประหลาด คล ายว าใจปลอดโปร ง ด จด งเช นฟ าครามเป นว นท เป ยมด วยร ก \Thaifont ในว นท เธออย ใกล ฉ น ช างเป นว นท แสนประหลาด คล ายว าใจปลอดโปร ง ด จด งเช นฟ าครามเป นว นท เป ยมด วยร ก
아랍어 Script=Arabic \newfontfamily{\arabicwrongfont}[scale=1.5]{adobe Arabic} \newfontfamily{\arabicfont}[script=arabic,scale=1.5]{adobe Arabic} \arabicwrongfont (wrong) بركته و الله رحمت و عليكم السلم \arabicfont (right) بركته و الله رحمت و عليكم السلم. Scheherazade Font بركته و الله رحمت و عليكم السلم
중국어 Script=CJK,Language=Chinese Simpli ed \newcommand\sampletext{ 崇祯五年十二月 余住西湖 大雪三日 湖中人鸟声俱绝 是日更定矣 余挐一小舟 拥毳衣炉火 独往湖心亭看雪 雾凇沆砀 天与云与山与水 上下一白 湖上影子 惟长堤一痕 湖心亭一点 与余舟一芥 舟中人两三粒而已 到亭上 有两人铺毡对坐 一童子烧酒 炉正沸 见余 大喜曰 湖中焉得更有此人! 拉余同饮 余强饮三大白而别 问其姓氏 是金陵人 客此 及下船 舟子喃喃曰 莫说相公痴 更有痴似相公者 } \newhanjafontfamily{\chinesefont}[script=cjk]{adobe Song Std} \newfontfamily\chnvertone[script=cjk,language=chinese Traditional, Vertical=RotatedGlyphs]{FZXingKai-S04T} \newfontfamily\chnver wo[script=cjk,language=chinese Traditional, Vertical=RotatedGlyphs]{FZShouJinShu-S10T}
중국어 ( 계속 ) Script=CJK,Language=Chinese Simpli ed
중국어 ( 계속 ) Script=CJK,Language=Chinese Traditional,Vertical=RotatedGlyphs 湖心亭看雪张岱崇祯五年十二月 余住西湖 大雪三日 湖中人鸟声俱绝 是日更定矣 余一小舟 拥毳衣炉火 独往湖心亭看雪 雾凇沆砀 天与云与山与水 上下一白 湖上影子 惟长堤一痕 湖心亭一点 与余舟一芥 舟中人两三粒而已 到亭上 有两人铺毡对坐 一童子烧酒 炉正沸 见余 大喜曰 湖中焉得更有此人! 拉余同饮 余强饮三大白而别 问其姓氏 是金陵人 客此 及下船 舟子喃喃曰 莫说相公痴 更有痴似相公者
중국어 ( 계속 ) Script=CJK,Language=Chinese Traditional,Vertical=RotatedGlyphs 湖心亭看雪张岱崇祯五年十二月 余住西湖 大雪三日 湖中人鸟声俱绝 是日更定矣 余一小舟 拥毳衣炉火 独往湖心亭看雪 雾凇沆砀 天与云与山与水 上下一白 湖上影子 惟长堤一痕 湖心亭一点 与余舟一芥 舟中人两三粒而已 到亭上 有两人铺毡对坐 一童子烧酒 炉正沸 见余 大喜曰 湖中焉得更有此人! 拉余同饮 余强饮三大白而别 问其姓氏 是金陵人 客此 及下船 舟子喃喃曰 莫说相公痴 更有痴似相公者
기타 Gentium 폰트. Ελληνικά Το εδώ βασανίζουν χρειάζονται. Μια ώς τέτοιο ανεπιθύμητη. Ώς τέτοιο διορθώσει ώρα, σας βιαστικά συνεντεύξεις μεταγλωτίσει κι, μη την πάρα επενδυτής. Μου οι πάντα ελέγχου, ναι τελευταία εκφράσουν ας. Σε θέμα αλφα διαχειριστής από, αν εντολές τελευταία ροή.. Русский Нас обеда быстрее проверить он, ещ за всех царь. Именно действий сохранение но вот. Вы зону большого над, языке английском лет их. Работе почему доверять ты тем. Хочу осуществлять нее от. Весьма письмо примерно бог ну, зону джоель ажиотажа до не, давать английски лет об.
가독성 Dear Grandma, I Wish you would let me use my computer to wirte to you. These darn leters take me two weeks to prepare. G'mon, this blackletter style is so old fashioned. Let me use one of my new and cool face, like Harrington! It's easier to read than this silly font! Love, Sonny Boy 할머니보세요. 제컴퓨터로할머니께편지를쓰면얼마나좋을까요. 이빌어먹을글자를그리느라두주를쏟아부었다구요. 할머니, 이블랙레터는진짜허접해요. 제발새로나온 Harrington! 같은폰트좀쓰게해주세요! 해링턴은이개념없는폰트보다훨씬읽기도쉽단말이에요. 손주놈올림. from The Non-Designer s Type Book by Robin Williams (not Actor!)
당부말씀 폰트를지나치게섞어쓰지마세요. X TEX-ko의기본설정을존중해주세요. E fontspec 매뉴얼을잘읽어보세요. KTUG 게시판에서자신이아는질문은답변을달아주세요. KTS 활동에즐겁게참여해주세요. 한국텍학회 한글텍사용자그룹 www.ktug.or.kr
윌로버트슨 (Will Robertson) from TUG Interview, 2007 fontspec 패키지의저자 스물아홉정도먹은젊은이호주남부 (Adelaide) 거주 Mechanical/ Mechatronic Engineering 박사과정 ( 아마 pass했을듯 ) 초콜릿카페에서아르바이트. 데워진우유에거품을내기위해초콜릿분말이나시럽을섞지않고진짜벨기에산초콜릿을녹여만든다고함. Frere-Jones Hoe er Text & Herman Zapf s Zap no: 매료된폰트두가지 PracTEX Journal의편집위원
더읽어볼자료 김도현, X TEX-ko 간단매뉴얼 ver. 1.6.1, 한국텍학회, 2010. E Will Robertson, The fontspec Package ver.1.18, August 9, 2008. David J.Perry, Creating Scholarly Mulilingual Documents Using Unicode, Opentype, and X TEX, June 21, 2009. E Robin Williams, The Non-Designer s Type Book, 2nd Ed., Pearson Education Inc., publishing as Peachit Press, 2006. ( 정상희옮김, 아름답고프로다운타이포그래피 101, 피어슨에듀케이션코리아, 2008) Adobe System Incorporated, OpenType User Guide for Adobe Fonts, October 2008. Adobe System Incorporated, Typography Primer, 2000. Microsoft Corporation, OpenType speci cation: OpenType Layout tag registry Feature tags, http://www.microsoft.com/typography/otspec/featuretags.htm, April 2002.