使用自定义字体

使用自定义字体

我创建了自己的字体,但在 latex 中使用它时遇到了麻烦。我正在使用 luatex、fontspec 和 book 类。这是我的测试文件:

\documentclass{book}

\usepackage{fontspec}

\setmainfont[Path=C:/Windows/Fonts/, Extension=.otf]{Tesouro-Regular.otf}

\begin{document}

AÁÀÃÂBCDEÉÊFGHIÍÎJKLMNOÓÕÔPQRSVTUÚVXWZY

aáàãâbcdeéèêfghiíjklmnoóõôpqrstuúvxwzy

12345667809110

\end{document}

编译没有错误,但是也没有pdf(文件未找到)。这是日志文件:

LOG FILE :
This is LuaTeX, Version 1.07.0 (MiKTeX 2.9.6670 64-bit) (format=lualatex 2018.4.28) 1 MAY 2018 10:36
restricted system commands enabled.
**a.tex
(./a.tex
LaTeX2e <2018-04-01> patch level 3
Lua module: luaotfload-main 2017/01/29 2.80001 OpenType layout system.
Lua module: lualibs 2017-02-01 2.5 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2017-02-01 2.5 ConTeXt Lua libraries -- extended co
llection.(using cache: C:/Users/migsi/AppData/Local/MiKTeX/2.9/luatex-cache/gene
ric)
luaotfload | conf : Root cache directory is C:/Users/migsi/AppData/Local/MiKTeX/
2.9/luatex-cache/generic/names.
luaotfload | init : Loading fontloader “fontloader-2017-02-11.lua” from kpse
-resolved path “C:/Program Files/MiKTeX 2.9/tex/luatex/luaotfload/fontloader-2
017-02-11.lua”.
Lua-only attribute luaotfload@state = 1
Lua-only attribute luaotfload@noligature = 2
Lua-only attribute luaotfload@syllabe = 3
luaotfload | init : Context OpenType loader version “3.027”
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 4
luaotfload | conf : Root cache directory is C:/Users/migsi/AppData/Local/MiKTeX/
2.9/luatex-cache/generic/names.
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 2 in `luaotfload.patch
_font'.
Inserting `luaotfload.aux.fixup_fontdata' at position 1 in `luaotfload.patch_fon
t_unsafe'.
Inserting `luaotfload.aux.set_capheight' at position 3 in `luaotfload.patch_font
'.
Inserting `luaotfload.rewrite_fontname' at position 4 in `luaotfload.patch_font'
.
luaotfload | main : initialization completed in 0.345 seconds
Babel <3.19> and hyphenation patterns for 1 language(s) loaded.
("C:/Program Files/MiKTeX 2.9/tex/latex/base/book.cls"
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
("C:/Program Files/MiKTeX 2.9/tex/latex/base/bk10.clo"
File: bk10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from C:/Users/migsi/AppData/Local/M
iKTeX/2.9/luatex-cache/generic/names/luaotfload-names.luc(load luc: C:/Users/mig
si/AppData/Local/MiKTeX/2.9/luatex-cache/generic/fonts/otl/lmroman10-regular.luc
))
\c@part=\count80
\c@chapter=\count81
\c@section=\count82
\c@subsection=\count83
\c@subsubsection=\count84
\c@paragraph=\count85
\c@subparagraph=\count86
\c@figure=\count87
\c@table=\count88
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) ("C:/Program Files/MiKTeX 2.9/tex/latex/fontspec/fontspec.sty"
(C:/Users/migsi/AppData/Roaming/MiKTeX/2.9/tex/latex/l3packages/xparse/xparse.s
ty (C:/Users/migsi/AppData/Roaming/MiKTeX/2.9/tex/latex/l3kernel/expl3.sty
Package: expl3 2018/03/05 L3 programming layer (loader)
(C:/Users/migsi/AppData/Roaming/MiKTeX/2.9/tex/latex/l3kernel/expl3-code.tex
Package: expl3 2018/03/05 L3 programming layer (code)
\ucharcat@table=\catcodetable5
\c_max_int=\count89
\l_tmpa_int=\count90
\l_tmpb_int=\count91
\g_tmpa_int=\count92
\g_tmpb_int=\count93
\g__intarray_font_int=\count94
\g__prg_map_int=\count95
\c_log_iow=\count96
\l_iow_line_count_int=\count97
\l__iow_line_target_int=\count98
\l__iow_one_indent_int=\count99
\l__iow_indent_int=\count100
\c_zero_dim=\dimen103
\c_max_dim=\dimen104
\l_tmpa_dim=\dimen105
\l_tmpb_dim=\dimen106
\g_tmpa_dim=\dimen107
\g_tmpb_dim=\dimen108
\c_zero_skip=\skip43
\c_max_skip=\skip44
\l_tmpa_skip=\skip45
\l_tmpb_skip=\skip46
\g_tmpa_skip=\skip47
\g_tmpb_skip=\skip48
\c_zero_muskip=\muskip10
\c_max_muskip=\muskip11
\l_tmpa_muskip=\muskip12
\l_tmpb_muskip=\muskip13
\g_tmpa_muskip=\muskip14
\g_tmpb_muskip=\muskip15
\l_keys_choice_int=\count101
\c__fp_leading_shift_int=\count102
\c__fp_middle_shift_int=\count103
\c__fp_trailing_shift_int=\count104
\c__fp_big_leading_shift_int=\count105
\c__fp_big_middle_shift_int=\count106
\c__fp_big_trailing_shift_int=\count107
\c__fp_Bigg_leading_shift_int=\count108
\c__fp_Bigg_middle_shift_int=\count109
\c__fp_Bigg_trailing_shift_int=\count110
\c__fp_rand_size_int=\count111
\c__fp_rand_four_int=\count112
\c__fp_rand_eight_int=\count113
\l__sort_length_int=\count114
\l__sort_min_int=\count115
\l__sort_top_int=\count116
\l__sort_max_int=\count117
\l__sort_true_max_int=\count118
\l__sort_block_int=\count119
\l__sort_begin_int=\count120
\l__sort_end_int=\count121
\l__sort_A_int=\count122
\l__sort_B_int=\count123
\l__sort_C_int=\count124
\l__tl_build_start_index_int=\count125
\l__tl_build_index_int=\count126
\l__tl_analysis_normal_int=\count127
\l__tl_analysis_index_int=\count128
\l__tl_analysis_nesting_int=\count129
\l__tl_analysis_type_int=\count130
\l__regex_internal_a_int=\count131
\l__regex_internal_b_int=\count132
\l__regex_internal_c_int=\count133
\l__regex_balance_int=\count134
\l__regex_group_level_int=\count135
\l__regex_mode_int=\count136
\c__regex_cs_in_class_mode_int=\count137
\c__regex_cs_mode_int=\count138
\l__regex_catcodes_int=\count139
\l__regex_default_catcodes_int=\count140
\c__regex_catcode_L_int=\count141
\c__regex_catcode_O_int=\count142
\c__regex_catcode_A_int=\count143
\c__regex_all_catcodes_int=\count144
\l__regex_show_lines_int=\count145
\l__regex_min_state_int=\count146
\l__regex_max_state_int=\count147
\l__regex_left_state_int=\count148
\l__regex_right_state_int=\count149
\l__regex_capturing_group_int=\count150
\l__regex_min_pos_int=\count151
\l__regex_max_pos_int=\count152
\l__regex_curr_pos_int=\count153
\l__regex_start_pos_int=\count154
\l__regex_success_pos_int=\count155
\l__regex_curr_char_int=\count156
\l__regex_curr_catcode_int=\count157
\l__regex_last_char_int=\count158
\l__regex_case_changed_char_int=\count159
\l__regex_curr_state_int=\count160
\l__regex_step_int=\count161
\l__regex_min_active_int=\count162
\l__regex_max_active_int=\count163
\l__regex_replacement_csnames_int=\count164
\l__regex_match_count_int=\count165
\l__regex_min_submatch_int=\count166
\l__regex_submatch_int=\count167
\l__regex_zeroth_submatch_int=\count168
\g__regex_trace_regex_int=\count169
\c_empty_box=\box26
\l_tmpa_box=\box27
\l_tmpb_box=\box28
\g_tmpa_box=\box29
\g_tmpb_box=\box30
\l__box_top_dim=\dimen109
\l__box_bottom_dim=\dimen110
\l__box_left_dim=\dimen111
\l__box_right_dim=\dimen112
\l__box_top_new_dim=\dimen113
\l__box_bottom_new_dim=\dimen114
\l__box_left_new_dim=\dimen115
\l__box_right_new_dim=\dimen116
\l__box_internal_box=\box31
\l__coffin_internal_box=\box32
\l__coffin_internal_dim=\dimen117
\l__coffin_offset_x_dim=\dimen118
\l__coffin_offset_y_dim=\dimen119
\l__coffin_x_dim=\dimen120
\l__coffin_y_dim=\dimen121
\l__coffin_x_prime_dim=\dimen122
\l__coffin_y_prime_dim=\dimen123
\c_empty_coffin=\box33
\l__coffin_aligned_coffin=\box34
\l__coffin_aligned_internal_coffin=\box35
\l_tmpa_coffin=\box36
\l_tmpb_coffin=\box37
\l__coffin_display_coffin=\box38
\l__coffin_display_coord_coffin=\box39
\l__coffin_display_pole_coffin=\box40
\l__coffin_display_offset_dim=\dimen124
\l__coffin_display_x_dim=\dimen125
\l__coffin_display_y_dim=\dimen126
\l__coffin_bounding_shift_dim=\dimen127
\l__coffin_left_corner_dim=\dimen128
\l__coffin_right_corner_dim=\dimen129
\l__coffin_bottom_corner_dim=\dimen130
\l__coffin_top_corner_dim=\dimen131
\l__coffin_scaled_total_height_dim=\dimen132
\l__coffin_scaled_width_dim=\dimen133
)
(C:/Users/migsi/AppData/Roaming/MiKTeX/2.9/tex/latex/l3kernel/l3pdfmode.def
File: l3pdfmode.def 2017/03/18 v L3 Experimental driver: PDF mode
\l__driver_color_stack_int=\count170
))
Package: xparse 2018/02/21 L3 Experimental document command parser
\l__xparse_current_arg_int=\count171
\g__xparse_grabber_int=\count172
\l__xparse_m_args_int=\count173
\l__xparse_mandatory_args_int=\count174
\l__xparse_v_nesting_int=\count175
)
Package: fontspec 2017/11/09 v2.6g Font selection for XeLaTeX and LuaLaTeX
Lua module: fontspec 2017/11/09 2.6g Font selection for XeLaTeX and LuaLaTeX
("C:/Program Files/MiKTeX 2.9/tex/latex/fontspec/fontspec-luatex.sty"
Package: fontspec-luatex 2017/11/09 v2.6g Font selection for XeLaTeX and LuaLaTe
X
\l__fontspec_script_int=\count176
\l__fontspec_language_int=\count177
\l__fontspec_strnum_int=\count178
\l__fontspec_tmp_int=\count179
\l__fontspec_em_int=\count180
\l__fontspec_emdef_int=\count181
\l__fontspec_strong_int=\count182
\l__fontspec_strongdef_int=\count183
\l__fontspec_tmpa_dim=\dimen134
\l__fontspec_tmpb_dim=\dimen135
\l__fontspec_tmpc_dim=\dimen136
\g__file_internal_ior=\read1
("C:/Program Files/MiKTeX 2.9/tex/latex/base/fontenc.sty"
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
("C:/Program Files/MiKTeX 2.9/tex/latex/base/tuenc.def"
File: tuenc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding TU on input line 82.
))
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \fontspec with sig. 'O{}mO{}' on line 545.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \setmainfont with sig. 'O{}mO{}' on line 549.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \setsansfont with sig. 'O{}mO{}' on line 553.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \setmonofont with sig. 'O{}mO{}' on line 557.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \setmathrm with sig. 'O{}mO{}' on line 561.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \setboldmathrm with sig. 'O{}mO{}' on line 565.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \setmathsf with sig. 'O{}mO{}' on line 569.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \setmathtt with sig. 'O{}mO{}' on line 573.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \setromanfont with sig. 'O{}mO{}' on line 577.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \newfontfamily with sig. 'mO{}mO{}' on line 581.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \newfontface with sig. 'mO{}mO{}' on line 585.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \defaultfontfeatures with sig. 't+om' on line 589.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \addfontfeatures with sig. 'm' on line 593.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \addfontfeature with sig. 'm' on line 597.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \newfontfeature with sig. 'mm' on line 601.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \newAATfeature with sig. 'mmmm' on line 605.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \newopentypefeature with sig. 'mmm' on line 609.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \newICUfeature with sig. 'mmm' on line 613.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \aliasfontfeature with sig. 'mm' on line 617.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \aliasfontfeatureoption with sig. 'mmm' on line 621.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \newfontscript with sig. 'mm' on line 625.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \newfontlanguage with sig. 'mm' on line 629.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \DeclareFontsExtensions with sig. 'm' on line 633.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \IfFontFeatureActiveTF with sig. 'mmm' on line 637.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \EncodingCommand with sig. 'mO{}m' on line 3366.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \EncodingAccent with sig. 'mm' on line 3372.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \EncodingSymbol with sig. 'mm' on line 3378.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \EncodingComposite with sig. 'mmm' on line 3384.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \EncodingCompositeCommand with sig. 'mmm' on line 3390.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \DeclareUnicodeEncoding with sig. 'mm' on line 3415.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \UndeclareSymbol with sig. 'm' on line 3421.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \UndeclareAccent with sig. 'm' on line 3427.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \UndeclareCommand with sig. 'm' on line 3433.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \UndeclareComposite with sig. 'mm' on line 3440.
.................................................
("C:/Program Files/MiKTeX 2.9/tex/latex/fontspec/fontspec.cfg")
LaTeX Info: Redefining \itshape on input line 3625.
LaTeX Info: Redefining \slshape on input line 3630.
LaTeX Info: Redefining \scshape on input line 3635.
LaTeX Info: Redefining \upshape on input line 3640.
LaTeX Info: Redefining \em on input line 3670.
LaTeX Info: Redefining \emph on input line 3695.
(load luc: C:/Users/migsi/AppData/Local/MiKTeX/2.9/luatex-cache/generic/fonts/ot
l/lmroman10-bold.luc)(load luc: C:/Users/migsi/AppData/Local/MiKTeX/2.9/luatex-c
ache/generic/fonts/otl/lmroman10-italic.luc)
LaTeX Info: Redefining \- on input line 3749.
.................................................
. LaTeX info: "xparse/redefine-command"
.
. Redefining command \oldstylenums with sig. 'm' on line 3844.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \liningnums with sig. 'm' on line 3848.
.................................................
))(load luc: C:/Users/migsi/AppData/Local/MiKTeX/2.9/luatex-cache/generic/fonts/
otl/tesouro-regular.luc)
luaotfload | aux : font no 26 (nil) defines no feature for script latn
luaotfload | aux : no font with id 26
.................................................
. fontspec info: "no-scripts"
.
. Font "Tesouro-Regular" does not contain any OpenType `Script' information.
.................................................
\g__fontspec_family_Tesouro-Regular.otf_int=\count184
luaotfload | aux : font no 26 (nil) does not define feature smcp for script wit
h language
luaotfload | aux : no font with id 26
.................................................
. fontspec info: "defining-font"
.
. Font family 'Tesouro-Regular.otf(0)' created for font 'Tesouro-Regular.otf'
. with options [Ligatures=TeX,Path=C:/Windows/Fonts/,Extension=.otf].
.
. This font family consists of the following NFSS series/shapes:
.
. - 'normal' (m/n) with NFSS spec.:
. <->"[C:/Windows/Fonts/Tesouro-Regular.otf]:mode=node;+tlig;"
. - 'small caps' (m/sc) with NFSS spec.:
.................................................
LaTeX Info: Redefining \rmfamily on input line 5.
(./a.aux)
\openout1 = a.aux
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
.................................................
. fontspec info: "setup-math"
.
. Adjusting the maths setup (use [no-math] to avoid this).
.................................................
\symlegacymaths=\mathgroup4
LaTeX Font Info: Overwriting symbol font `legacymaths' in version `bold'
(Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 7.
LaTeX Font Info: Redeclaring math accent \acute on input line 7.
LaTeX Font Info: Redeclaring math accent \grave on input line 7.
LaTeX Font Info: Redeclaring math accent \ddot on input line 7.
LaTeX Font Info: Redeclaring math accent \tilde on input line 7.
LaTeX Font Info: Redeclaring math accent \bar on input line 7.
LaTeX Font Info: Redeclaring math accent \breve on input line 7.
LaTeX Font Info: Redeclaring math accent \check on input line 7.
LaTeX Font Info: Redeclaring math accent \hat on input line 7.
LaTeX Font Info: Redeclaring math accent \dot on input line 7.
LaTeX Font Info: Redeclaring math accent \mathring on input line 7.
LaTeX Font Info: Redeclaring math symbol \colon on input line 7.
LaTeX Font Info: Redeclaring math symbol \Gamma on input line 7.
LaTeX Font Info: Redeclaring math symbol \Delta on input line 7.
LaTeX Font Info: Redeclaring math symbol \Theta on input line 7.
LaTeX Font Info: Redeclaring math symbol \Lambda on input line 7.
LaTeX Font Info: Redeclaring math symbol \Xi on input line 7.
LaTeX Font Info: Redeclaring math symbol \Pi on input line 7.
LaTeX Font Info: Redeclaring ma

相关内容