[爆卦]otf字體是什麼?優點缺點精華區懶人包

為什麼這篇otf字體鄉民發文收入到精華區:因為在otf字體這個討論話題中,有許多相關的文章在討論,這篇最有參考價值!作者mathfeel (mathfeel)看板LaTeX標題[問題] 可以用otf字體嗎?時間Sat...

otf字體 在 ????? 色調分享/社群行銷 / 熱門話題 Instagram 的精選貼文

2021-02-03 19:16:52

『不藏私分享5個超好用APP』  ——————————————————  今天小編要分享跟大家5款超級好用的APP! 它們可以幫助你提高製作貼文時的生產力 亦可增加你的美感😆還沒下載的朋友們可以先收藏貼文 有時間在慢慢看❤️  ——————————————————  |Canv...


在latx上,請教一下。

--
You are an intelligent human being.
Your life is valuable for its own sake.
You are not second-class in the universe, deriving meaning and purpose from some other mind.
You are not inherently evil—you are inherently human, possessing the positive rational potential to help make this a world of morality, peace and joy.
Trust yourself.


--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 71.136.62.226
gorhow:可以PO一行文嗎 = = 03/24 17:39
as1986:你可以考慮xetex 03/24 18:45
mathfeel:怎麼用?我現在在linux上跑tetex 03/26 17:52

> -------------------------------------------------------------------------- <

發信人: [email protected] (蒙古大夫 2.0), 看板: LaTeX
標 題: Re: [問題] 可以用otf字體嗎?
發信站: SayYA 資訊站 (Mon Mar 26 18:33:15 2007)
轉信站: ptt!ctu-reader!news.nctu!SayYa

※ 引述《[email protected] (mathfeel)》之銘言:
> 在latx上,請教一下。

最簡單的方式就是安裝 XeTeX,假設你系統上有安裝 ARStdSongProMedium.otf。

<code ctest.tex in UTF-8 encoding>
\font\chfont="AR StdSongPro" at 12pt % ARStdSongProMedium.otf
\chfont
將進酒\par

君不見 黃河之水天上來 奔流到海不復回\par
君不見 高堂明鏡悲白髮 朝如青絲暮成雪
\bye
<code>

xetex ctest.tex

就會產生 ctest.pdf,其中就會嵌入 ARStdSongProMedium.otf。

其他功能及 xelatex 請自行參考 XeTeX 的文件說明。


--
道隱於小成,言隱於榮華。(莊子.齊物論)
--
※ Origin: SayYA 資訊站 <bbs.sayya.org>
◆ From: edt1023.sayya.org
mathfeel:感謝...剛才一看還以為要在tex檔里盡xml code...^_^ 03/27 02:26
mathfeel:我看了一下xetex的網站,那它支持ttf嗎?還是只能otf? 03/27 02:28

> -------------------------------------------------------------------------- <

作者: mathfeel (mathfeel) 看板: LaTeX
標題: Re: [問題] 可以用otf字體嗎?
時間: Sat Mar 31 16:33:10 2007

※ 引述《[email protected] (蒙古大夫 2.0)》之銘言:
: ※ 引述《[email protected] (mathfeel)》之銘言:
: > 在latx上,請教一下。
: 最簡單的方式就是安裝 XeTeX,假設你系統上有安裝 ARStdSongProMedium.otf。
: <code ctest.tex in UTF-8 encoding>
: \font\chfont="AR StdSongPro" at 12pt % ARStdSongProMedium.otf
: \chfont
: 將進酒\par
: 君不見 黃河之水天上來 奔流到海不復回\par
: 君不見 高堂明鏡悲白髮 朝如青絲暮成雪
: \bye
: <code>
: xetex ctest.tex
: 就會產生 ctest.pdf,其中就會嵌入 ARStdSongProMedium.otf。
: 其他功能及 xelatex 請自行參考 XeTeX 的文件說明。
xetex 不能出dvi和ps嗎?
anyway,我一個簡單的tex檔:

\documentclass[12pt,a4paper]{article}
\begin{document}
\font\APKai="AR PL New Kai ExtB" at 12pt
\APKai 這是中文字。
\end{document}

結果是:
$ xelatex sample-utf8.tex
This is XeTeX, Version 3.141592-2.2-0.995 (Web2C 7.5.5)
entering extended mode
(./sample-utf8.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman,
b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto,
e
stonian, finnish, greek, icelandic, irish, italian, latin, norsk, polish,
portu
ges, romanian, slovak, slovene, spanish, swedish, turkish, ukrainian,
nohyphena
tion, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo)) (./sample-utf8.aux) [1]
(./sample-utf8.aux) )
(see the transcript file for additional information)
stdin -> sample-utf8.pdf
[1
** NOTICE: This document contains a `Preview & Print only' licensed font **
Output written on sample-utf8.pdf (1 page).
Transcript written on sample-utf8.log.
~ $ ls -al sample-utf8.pdf
-rw-r--r-- 1 mzhang mzhang 0 2007-03-31 08:28 sample-utf8.pdf

pdf的size是0...

...求救

--
pub 2048R/9CB5B35A 2/20/2006 Matthew Zhang (gmail key) <[email protected]>
Primary key fingerprint: 9607 7903 1D12 F060 AD76 3705 5CE2 0A3E 9CB5 B35A

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 71.136.56.177
as1986:你會不會沒裝xdvipdfmx? 03/31 21:47
mathfeel:我有。因為如果只是英文檔沒有問題 04/01 05:03

> -------------------------------------------------------------------------- <

發信人: [email protected] (蒙古大夫 2.0), 看板: LaTeX
標 題: Re: [問題] 可以用otf字體嗎?
發信站: 交大資訊次世代BS2 (Sat Mar 31 19:04:53 2007)
轉信站: ptt!ctu-reader!ctu-peer!news.nctu!news.cis.nctu!BS2

※ 引述《[email protected] (mathfeel)》之銘言:
> xetex 不能出dvi和ps嗎?

使用 -no-pdf 參數。

> anyway,我一個簡單的tex檔:
> \documentclass[12pt,a4paper]{article}
> \begin{document}
> \font\APKai="AR PL New Kai ExtB" at 12pt

Unicode CJK Ext B 的字型中不含我們平常要用到的字。請改用
AR PL New Kai。

xelatex 請使用 fontspec package 較方便。

> \APKai 這是中文字。
> \end{document}
> 結果是:
[...]
> ~ $ ls -al sample-utf8.pdf
> -rw-r--r-- 1 mzhang mzhang 0 2007-03-31 08:28 sample-utf8.pdf
> pdf的size是0...
> ..求救


--
▄▄▄▄▄▄▄ ▄▄▄▄ ▄▄▄▄▄▄ <telnet://bbs.cs.nctu.edu.tw>
█▄▄▄▄█ █ ▄▄▄▄▄█ Player: EdwardLee
▄█▄▄▄▄█ ▄▄▄█ █▄▄▄▄▄ From: linux.cc.ntu.edu.tw
☆ 次世代BS2 ☆ 可申請個人板 150MB 相簿 http://pic.bs2.to 交大資訊人 250MB

> -------------------------------------------------------------------------- <

作者: mathfeel (mathfeel) 看板: LaTeX
標題: Re: [問題] 可以用otf字體嗎?
時間: Sun Apr 1 05:02:45 2007

※ 引述《[email protected] (蒙古大夫 2.0)》之銘言:
: ※ 引述《[email protected] (mathfeel)》之銘言:
: > xetex 不能出dvi和ps嗎?
: 使用 -no-pdf 參數。
Thank you.

: > anyway,我一個簡單的tex檔:
: > \documentclass[12pt,a4paper]{article}
: > \begin{document}
: > \font\APKai="AR PL New Kai ExtB" at 12pt
: Unicode CJK Ext B 的字型中不含我們平常要用到的字。請改用
: AR PL New Kai。
okay...

: xelatex 請使用 fontspec package 較方便。
可以給一個很簡單一兩行字的例嗎?我一直都用英文寫paper,都懶得換字體因為沒有需要。

: > \APKai 這是中文字。
: > \end{document}
: > 結果是:
: [...]
: > ~ $ ls -al sample-utf8.pdf
: > -rw-r--r-- 1 mzhang mzhang 0 2007-03-31 08:28 sample-utf8.pdf
: > pdf的size是0...
: > ..求救

--
pub 2048R/9CB5B35A 2/20/2006 Matthew Zhang (gmail key) <[email protected]>
Primary key fingerprint: 9607 7903 1D12 F060 AD76 3705 5CE2 0A3E 9CB5 B35A

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 71.136.56.177

> -------------------------------------------------------------------------- <

發信人: [email protected] (蒙古大夫 2.0), 看板: LaTeX
標 題: Re: [問題] 可以用otf字體嗎?
發信站: 交大資訊次世代BS2 (Sun Apr 1 10:23:19 2007)
轉信站: ptt!ctu-reader!ctu-peer!news.nctu!news.cis.nctu!BS2

※ 引述《[email protected] (mathfeel)》之銘言:
> ※ 引述《[email protected] (蒙古大夫 2.0)》之銘言:
> : xelatex 請使用 fontspec package 較方便。
> 可以給一個很簡單一兩行字的例嗎?我一直都用英文寫paper,都懶得換字體因為沒有需要。

<code>
\documentclass{article}
\usepackage{fontspec}
\usepackage{xltxtra}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\setmainfont[BoldFont={cwTeXHeiBold},
ItalicFont={cwTeXFangSong},
Mapping=tex-text]{cwTeXMing}
\begin{document}
\section*{將進酒}
君不見 黃河之水天上來 奔流到海不復回\\
君不見 高堂明鏡悲白髮 朝如青絲暮成雪
\end{codument}
</code>

BTW,fontspec 的使用手冊就會有詳細的說明。既然不用中文,那麼直接
用 latex/pdflatex 就可以了。xetex 目前取字型是很方便,但取了中文
字型,那英文的部份也會去使用中文字型中的英文。


ps.這個例子並沒去定義 mono/sans 的字型。

--
▄▄▄▄▄▄▄ ▄▄▄▄ ▄▄▄▄▄▄ <telnet://bbs.cs.nctu.edu.tw>
█▄▄▄▄█ █ ▄▄▄▄▄█ Player: EdwardLee
▄█▄▄▄▄█ ▄▄▄█ █▄▄▄▄▄ From: linux.cc.ntu.edu.tw
☆ 次世代BS2 ☆ 可申請個人板 150MB 相簿 http://pic.bs2.to 交大資訊人 250MB

> -------------------------------------------------------------------------- <

作者: mathfeel (mathfeel) 看板: LaTeX
標題: Re: [問題] 可以用otf字體嗎?
時間: Sun Apr 1 12:43:08 2007

\documentclass{article}
\usepackage{fontspec}
\usepackage{xltxtra}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\setmainfont[BoldFont={cwTeXHeiBold},
ItalicFont={cwTeXFangSong},
Mapping=tex-text]{cwTeXMing}
\begin{document}
\section*{將進酒}
君不見 黃河之水天上來 奔流到海不復回\\
君不見 高堂明鏡悲白髮 朝如青絲暮成雪
\end{codument}

結果一樣:
$ xelatex sample-utf8.tex
This is XeTeX, Version 3.141592-2.2-0.995 (Web2C 7.5.5)
entering extended mode
(./sample-utf8.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman,
b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto,
e
stonian, finnish, greek, icelandic, irish, italian, latin, norsk, polish,
portu
ges, romanian, slovak, slovene, spanish, swedish, turkish, ukrainian,
nohyphena
tion, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.sty
(/usr/share/texmf/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf/tex/latex/tools/calc.sty)
(/usr/share/texmf/tex/xelatex/xkeyval/xkeyval.sty
(/usr/share/texmf/tex/xelatex/xkeyval/xkeyval.tex
(/usr/share/texmf/tex/xelatex/xkeyval/keyval.tex)))
fontspec.cfg loaded.
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.cfg))
(/usr/share/texmf/tex/xelatex/xltxtra.sty
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/xelatex/graphics/graphics.cfg)
(/usr/share/texmf/tex/xelatex/graphics/xetex.def)))
(/usr/share/texmf/tex/xelatex/xunicode.sty)
(/usr/share/texmf/tex/latex/etex/etex.sty)
(/usr/share/texmf/tex/latex/base/fixltx2e.sty)

LaTeX Warning: You have requested, on input line 100, version
`2006/03/24' of package fixltx2e,
but only version
`2004/02/13 v1.1h fixes to LaTeX'
is available.

) (./sample-utf8.aux) [1] (./sample-utf8.aux) )
stdin -> sample-utf8.pdf
[1
** NOTICE: This document contains a `Preview & Print only' licensed font **
Output written on sample-utf8.pdf (1 page).
Transcript written on sample-utf8.log.

出來的pdf檔還是0 byte.
我把里面所有中文改成英文,結果一樣。

--
pub 2048R/9CB5B35A 2/20/2006 Matthew Zhang (gmail key) <[email protected]>
Primary key fingerprint: 9607 7903 1D12 F060 AD76 3705 5CE2 0A3E 9CB5 B35A

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 71.136.56.177

> -------------------------------------------------------------------------- <

發信人: [email protected] (蒙古大夫 2.0), 看板: LaTeX
標 題: Re: [問題] 可以用otf字體嗎?
發信站: 交大資訊次世代BS2 (Sun Apr 1 14:34:23 2007)
轉信站: ptt!ctu-reader!ctu-peer!news.nctu!news.cis.nctu!BS2

※ 引述《[email protected] (mathfeel)》之銘言:
> \documentclass{article}
> \usepackage{fontspec}
> \usepackage{xltxtra}
> \XeTeXlinebreaklocale "zh"
> \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
> \setmainfont[BoldFont={cwTeXHeiBold},
> ItalicFont={cwTeXFangSong},
> Mapping=tex-text]{cwTeXMing}
> \begin{document}
> \section*{將進酒}
> 君不見 黃河之水天上來 奔流到海不復回\\
> 君不見 高堂明鏡悲白髮 朝如青絲暮成雪
> \end{codument}
^^^^^^^^^^^^^
typo \end{document}

> 結果一樣:
> $ xelatex sample-utf8.tex
[...]
> ** NOTICE: This document contains a `Preview & Print only' licensed font **
> Output written on sample-utf8.pdf (1 page).
> Transcript written on sample-utf8.log.
> 出來的pdf檔還是0 byte.
> 我把里面所有中文改成英文,結果一樣。

你的作業系統要安裝 cwttf:

http://cle.linux.org.tw/fonts/cwttf/


--
▄▄▄▄▄▄▄ ▄▄▄▄ ▄▄▄▄▄▄ <telnet://bbs.cs.nctu.edu.tw>
█▄▄▄▄█ █ ▄▄▄▄▄█ Player: EdwardLee
▄█▄▄▄▄█ ▄▄▄█ █▄▄▄▄▄ From: linux.cc.ntu.edu.tw
☆ 次世代BS2 ☆ 可申請個人板 150MB 相簿 http://pic.bs2.to 交大資訊人 250MB
mathfeel:原檔沒錯,我在ptt上打錯而已 04/02 17:51

你可能也想看看

搜尋相關網站