Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Source Han with harf mode #126

Closed
stone-zeng opened this issue Dec 16, 2019 · 6 comments
Closed

Use Source Han with harf mode #126

stone-zeng opened this issue Dec 16, 2019 · 6 comments

Comments

@stone-zeng
Copy link

Source Han Sans/Serif can't be loaded in harf mode:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Source Han Sans SC}[Renderer=Harfbuzz]
\begin{document}
你好
\end{document}

Compiled with lualatex-dev, it gives:

(/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.cfg)))...mf-dis
t/tex/luatex/luaotfload/luaotfload-harf-define.lua:225: attempt to index a nil 
value (local 'data').
<to be read again> 
relax 
l.3 ...infont{Source Han Sans SC}[Renderer=Harfbuzz]
                                                  
?

I don't know whether one should or shouldn't use Harfbuzz here.

@khaledhosny
Copy link
Contributor

Do you happen to have a Type 1 version of the font installed? What does luaotfload-tool --find "Source Han Sans SC" return?

This error messages should be caught some how, though. HarfBuzz loader can only load SFNT fonts, so failures like this are expected to happen and should give some meaningful error message.

@stone-zeng
Copy link
Author

I only installed SourceHanNotoCJK.ttc from adobe-fonts/source-han-super-otc.

$ luaotfload-tool --find "Source Han Sans SC"
luaotfload | resolve : Font "Source Han Sans SC" found!
luaotfload | resolve : Resolved file name "/Library/Fonts/SourceHanNotoCJK.ttc", subfont nr. 18

@u-fischer
Copy link
Member

u-fischer commented Dec 16, 2019

Works ok for me. But I have development versions in some cases. Can you please attach the whole log-file?

And try also without harfbuzz so that we can see which font is used.

@stone-zeng
Copy link
Author

Version info:

$ lualatex-dev --credits
This is LuaHBTeX, Version 1.11.2 (TeX Live 2020/dev)

The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso.

LuaHBTeX merges and builds upon (parts of) the code from these projects:

tex       : Donald Knuth
etex      : Peter Breitenlohner, Phil Taylor and friends
omega     : John Plaice and Yannis Haralambous
aleph     : Giuseppe Bilotta
pdftex    : Han The Thanh and friends
kpathsea  : Karl Berry, Olaf Weber and others
lua       : Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo
metapost  : John Hobby, Taco Hoekwater, Luigi Scarso, Hans Hagen and friends
pplib     : Paweł Jackowski
fontforge : George Williams (partial)
luajit    : Mike Pall (used in LuajitTeX)

Compiled with libharfbuzz 2.6.4; using 2.6.4
Compiled with libpng 1.6.37; using 1.6.37
Compiled with lua version 5.3.5
Compiled with mplib version 2.00
Compiled with zlib 1.2.11; using 1.2.11

Development id: 7226
$ tlmgr info luaotfload --only-installed
package:     luaotfload
category:    Package
shortdesc:   OpenType 'loader' for Plain TeX and LaTeX
longdesc:    The package adopts the TrueType/OpenType Font loader code provided in ConTeXt, and adapts it to use in Plain TeX and LaTeX. It works under LuaLaTeX only.
installed:   Yes
revision:    52738
sizes:       src: 25k, doc: 957k, run: 7253k, bin: 5k
relocatable: No
cat-version: 3.11
cat-date:    2019-11-11 10:37:48 +0100
cat-license: gpl2
cat-topics:  font-use luatex
cat-contact-repository: https://github.com/latex3/luaotfload
cat-contact-support: https://github.com/latex3/luaotfload/issues
collection:  collection-luatex
Log file (with Renderer=Harfbuzz)
This is LuaHBTeX, Version 1.11.2 (TeX Live 2020/dev)  (format=lualatex-dev 2019.12.11)  16 DEC 2019 20:11
 restricted system commands enabled.
**test
(./test.tex
LaTeX2e <2020-02-01> pre-release-2 (development 2019-12-11 branch)
Lua module: luaotfload-main 2019-11-10 3.11 luaotfload entry point
Lua module: luaotfload-init 2019-11-10 3.11 luaotfload submodule / initializatio
n
Lua module: lualibs 2019-11-06 2.69 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2019-11-06 2.69 ConTeXt Lua libraries -- extended c
ollection.
Lua module: luaotfload-log 2019-11-10 3.11 luaotfload submodule / logging
Lua module: luaotfload-parsers 2019-11-10 3.11 luaotfload submodule / filelist
Lua module: luaotfload-configuration 2019-11-10 3.11 luaotfload submodule / conf
ig file reader
luaotfload | conf : Root cache directory is /Users/xdzeng/Library/texlive/2019/t
exmf-var/luatex-cache/generic/names.
luaotfload | init : Loading fontloader “fontloader-2019-10-29.lua” from kpse
-resolved path “/usr/local/texlive/2019/texmf-dist/tex/luatex/luaotfload/fontl
oader-2019-10-29.lua”.
Lua-only attribute luaotfload@state = 2
Lua-only attribute luaotfload@noligature = 3
Lua-only attribute luaotfload@syllabe = 4
luaotfload | init : Context OpenType loader version “3.11”
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Lua module: luaotfload-loaders 2019-11-10 3.11 luaotfload submodule / callback h
andling
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua module: luaotfload-database 2019-11-10 3.11 luaotfload submodule / database
Lua module: luaotfload-unicode 2019-11-10 3.11 luaotfload submodule / Unicode he
lpers
Lua module: luaotfload-colors 2019-11-10 3.11 luaotfload submodule / color
Lua-only attribute luaotfload_color_attribute = 5
Lua module: luaotfload-resolvers 2019-11-10 3.11 luaotfload submodule / resolver
s
luaotfload | conf : Root cache directory is /Users/xdzeng/Library/texlive/2019/t
exmf-var/luatex-cache/generic/names.
Lua module: luaotfload-features 2019-11-10 3.11 luaotfload submodule / features
Lua module: luaotfload-letterspace 2019-11-10 3.11 luaotfload submodule / color
Lua module: luaotfload-embolden 2019-11-10 3.11 luaotfload submodule / color
Lua module: luaotfload-notdef 2019-11-10 3.11 luaotfload submodule / color
Lua module: luaotfload-harf-define 2019-11-10 3.11 luaotfload submodule / databa
se
Lua module: luaotfload-script 2019-11-10 3.11 luaotfload submodule / Script help
ers
Lua module: luaotfload-harf-plug 2019-11-10 3.11 luaotfload submodule / database
Inserting `Harf pre_output_filter callback' at position 1 in `pre_output_filter'
.
Inserting `Harf wrapup_run callback' at position 1 in `wrapup_run'.
Inserting `Harf finish_pdffile callback' at position 1 in `finish_pdffile'.
Inserting `Harf glyph_info callback' at position 1 in `glyph_info'.
Lua module: luaotfload-auxiliary 2019-11-10 3.11 luaotfload submodule / auxiliar
y functions
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.set_font_index' at position 2 in `luaotfload.patch_fon
t'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 3 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 4 in `luaotfload.patch_font
'.
Inserting `luaotfload.aux.set_xheight' at position 5 in `luaotfload.patch_font'.
Lua module: luaotfload-multiscript 2019-11-10 3.11 luaotfload submodule / multis
cript
Lua module: luaotfload-tounicode 2019-11-10 3.11 luaotfload submodule / tounicod
e
Inserting `luaotfload.rewrite_fontname' at position 6 in `luaotfload.patch_font'
.
luaotfload | main : initialization completed in 0.173 seconds
expl3 <2019-11-07> L3 programming layer
(/usr/local/texlive/2019/texmf-dist/tex/latex-dev/base/article.cls
Document Class: article 2019/10/25 v1.4k Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex-dev/base/size10.clo
File: size10.clo 2019/10/25 v1.4k Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from /Users/xdzeng/Library/texlive/
2019/texmf-var/luatex-cache/generic/names/luaotfload-names.luc)
\c@part=\count163
\c@section=\count164
\c@subsection=\count165
\c@subsubsection=\count166
\c@paragraph=\count167
\c@subparagraph=\count168
\c@figure=\count169
\c@table=\count170
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen134
)
(/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2019-11-07 L3 programming layer (loader) 

(/usr/local/texlive/2019/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def
File: l3backend-pdfmode.def 2019-04-06 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count171
\l__pdf_internal_box=\box45
))
Package: xparse 2019-10-11 L3 Experimental document command parser
\l__xparse_current_arg_int=\count172
\g__xparse_grabber_int=\count173
\l__xparse_m_args_int=\count174
\l__xparse_v_nesting_int=\count175
)
Package: fontspec 2019/10/19 v2.7d Font selection for XeLaTeX and LuaLaTeX
Lua module: fontspec 2019/10/19 2.7d Font selection for XeLaTeX and LuaLaTeX (/
usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
Package: fontspec-luatex 2019/10/19 v2.7d 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_tmpa_int=\count180
\l__fontspec_tmpb_int=\count181
\l__fontspec_tmpc_int=\count182
\l__fontspec_em_int=\count183
\l__fontspec_emdef_int=\count184
\l__fontspec_strong_int=\count185
\l__fontspec_strongdef_int=\count186
\l__fontspec_tmpa_dim=\dimen135
\l__fontspec_tmpb_dim=\dimen136
\l__fontspec_tmpc_dim=\dimen137

(/usr/local/texlive/2019/texmf-dist/tex/latex-dev/base/fontenc.sty
Package: fontenc 2018/08/11 v2.0j Standard LaTeX package

(/usr/local/texlive/2019/texmf-dist/tex/latex-dev/base/tuenc.def
File: tuenc.def 2018/08/11 v2.0j Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding TU on input line 82.
))
(/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.cfg)
LaTeX Info: Redefining \itshape on input line 3785.
LaTeX Info: Redefining \slshape on input line 3790.
LaTeX Info: Redefining \scshape on input line 3795.
LaTeX Info: Redefining \upshape on input line 3800.
LaTeX Info: Redefining \em on input line 3830.
LaTeX Info: Redefining \emph on input line 3855.
))
luaotfload | cache : Lookup cache loaded from /Users/xdzeng/Library/texlive/2019
/texmf-var/luatex-cache/generic/names/luaotfload-lookup-cache.luc.

Package fontspec Info: Could not resolve font "SourceHanSansSC/BI" (it
(fontspec)             probably doesn't exist).


Package fontspec Info: Could not resolve font "SourceHanSansSC/I" (it probably
(fontspec)             doesn't exist).

luaotfload | aux : font no 29 (nil) does not define feature smcp for script latn
 with language dflt
luaotfload | aux : font no 32 (nil) does not define feature smcp for script latn
 with language dflt

Package fontspec Info: Font family 'SourceHanSansSC(0)' created for font
(fontspec)             'Source Han Sans SC' with options
(fontspec)             [Ligatures=TeX,Renderer=Harfbuzz].
(fontspec)              
(fontspec)              This font family consists of the following NFSS
(fontspec)             series/shapes:
(fontspec)              
(fontspec)             - 'normal' (m/n) with NFSS spec.:
(fontspec)             <->"SourceHanSansSC:mode=harf;script=latn;language=DFLT;+
tlig;"
(fontspec)             - 'small caps'  (m/sc) with NFSS spec.: 
(fontspec)             - 'bold' (bx/n) with NFSS spec.:
(fontspec)             <->"SourceHanSansSC/B:mode=harf;script=latn;language=DFLT
;+tlig;"
(fontspec)             - 'bold small caps'  (bx/sc) with NFSS spec.: 

LaTeX Info: Redefining \rmfamily on input line 3.
...mf-dist/tex/luatex/luaotfload/luaotfload-harf-define.lua:225: attempt to inde
x a nil value (local 'data').
<to be read again> 
relax 
l.3 ...infont{Source Han Sans SC}[Renderer=Harfbuzz]
                                                  
? 
! Font \TU/SourceHanSansSC(0)/m/n/10=SourceHanSansSC:mode=harf;script=latn;langu
age=DFLT;+tlig; at 10pt not loadable: metric data not found or bad.
<to be read again> 
relax 
l.3 ...infont{Source Han Sans SC}[Renderer=Harfbuzz]
                                                  
? 
(./test.aux)
\openout1 = test.aux

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.

Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid
(fontspec)             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 4.
LaTeX Font Info:    Redeclaring math accent \acute on input line 4.
LaTeX Font Info:    Redeclaring math accent \grave on input line 4.
LaTeX Font Info:    Redeclaring math accent \ddot on input line 4.
LaTeX Font Info:    Redeclaring math accent \tilde on input line 4.
LaTeX Font Info:    Redeclaring math accent \bar on input line 4.
LaTeX Font Info:    Redeclaring math accent \breve on input line 4.
LaTeX Font Info:    Redeclaring math accent \check on input line 4.
LaTeX Font Info:    Redeclaring math accent \hat on input line 4.
LaTeX Font Info:    Redeclaring math accent \dot on input line 4.
LaTeX Font Info:    Redeclaring math accent \mathring on input line 4.
LaTeX Font Info:    Redeclaring math symbol \colon on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Gamma on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Delta on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Theta on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Lambda on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Xi on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Pi on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Sigma on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Upsilon on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Phi on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Psi on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Omega on input line 4.
LaTeX Font Info:    Redeclaring math symbol \mathdollar on input line 4.
LaTeX Font Info:    Redeclaring symbol font `operators' on input line 4.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `normal' on input line 4.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> TU/SourceHanSansSC(0)/m/n on input line 
4.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `bold' on input line 4.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> TU/SourceHanSansSC(0)/m/n on input line
 4.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  TU/SourceHanSansSC(0)/m/n --> TU/SourceHanSansSC(0)/m/n 
on input line 4.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> TU/SourceHanSansSC(0)/m/it on input lin
e 4.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> TU/SourceHanSansSC(0)/bx/n on input lin
e 4.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> TU/lmss/m/n on input line 4.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/m/n on input line 4.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  TU/SourceHanSansSC(0)/m/n --> TU/SourceHanSansSC(0)/bx/n
 on input line 4.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> TU/SourceHanSansSC(0)/bx/it on input l
ine 4.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> TU/lmss/bx/n on input line 4.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/bx/n on input line 4.
 [1

Missing character: There is no 你 (U+4F60) in font nullfont!
Missing character: There is no 好 (U+597D) in font nullfont!
Missing character: There is no 1 (U+0031) in font nullfont!
] (./test.aux))

Here is how much of LuaTeX's memory you used:
 2947 strings out of 484709
 100000,383344 words of node,token memory allocated
 406 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 48 glue_spec,
 4 attribute_list, 1 write nodes
   avail lists: 1:1,2:15,3:2,4:1,5:21,6:1,7:14,9:7
 16779 multiletter control sequences out of 65536+600000
 32 fonts using 56363147 bytes
 43i,4n,70p,252b,237s stack positions out of 5000i,500n,10000p,200000b,100000s
Output written on test.pdf (1 page, 892 bytes).

PDF statistics: 8 PDF objects out of 1000 (max. 8388607)
 4 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 131072)
 1 words of extra memory for PDF output out of 10000 (max. 100000000)
Log file (without Renderer=Harfbuzz)
This is LuaHBTeX, Version 1.11.2 (TeX Live 2020/dev)  (format=lualatex-dev 2019.12.11)  16 DEC 2019 20:14
 restricted system commands enabled.
**test
(./test.tex
LaTeX2e <2020-02-01> pre-release-2 (development 2019-12-11 branch)
Lua module: luaotfload-main 2019-11-10 3.11 luaotfload entry point
Lua module: luaotfload-init 2019-11-10 3.11 luaotfload submodule / initializatio
n
Lua module: lualibs 2019-11-06 2.69 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2019-11-06 2.69 ConTeXt Lua libraries -- extended c
ollection.
Lua module: luaotfload-log 2019-11-10 3.11 luaotfload submodule / logging
Lua module: luaotfload-parsers 2019-11-10 3.11 luaotfload submodule / filelist
Lua module: luaotfload-configuration 2019-11-10 3.11 luaotfload submodule / conf
ig file reader
luaotfload | conf : Root cache directory is /Users/xdzeng/Library/texlive/2019/t
exmf-var/luatex-cache/generic/names.
luaotfload | init : Loading fontloader “fontloader-2019-10-29.lua” from kpse
-resolved path “/usr/local/texlive/2019/texmf-dist/tex/luatex/luaotfload/fontl
oader-2019-10-29.lua”.
Lua-only attribute luaotfload@state = 2
Lua-only attribute luaotfload@noligature = 3
Lua-only attribute luaotfload@syllabe = 4
luaotfload | init : Context OpenType loader version “3.11”
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Lua module: luaotfload-loaders 2019-11-10 3.11 luaotfload submodule / callback h
andling
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua module: luaotfload-database 2019-11-10 3.11 luaotfload submodule / database
Lua module: luaotfload-unicode 2019-11-10 3.11 luaotfload submodule / Unicode he
lpers
Lua module: luaotfload-colors 2019-11-10 3.11 luaotfload submodule / color
Lua-only attribute luaotfload_color_attribute = 5
Lua module: luaotfload-resolvers 2019-11-10 3.11 luaotfload submodule / resolver
s
luaotfload | conf : Root cache directory is /Users/xdzeng/Library/texlive/2019/t
exmf-var/luatex-cache/generic/names.
Lua module: luaotfload-features 2019-11-10 3.11 luaotfload submodule / features
Lua module: luaotfload-letterspace 2019-11-10 3.11 luaotfload submodule / color
Lua module: luaotfload-embolden 2019-11-10 3.11 luaotfload submodule / color
Lua module: luaotfload-notdef 2019-11-10 3.11 luaotfload submodule / color
Lua module: luaotfload-harf-define 2019-11-10 3.11 luaotfload submodule / databa
se
Lua module: luaotfload-script 2019-11-10 3.11 luaotfload submodule / Script help
ers
Lua module: luaotfload-harf-plug 2019-11-10 3.11 luaotfload submodule / database
Inserting `Harf pre_output_filter callback' at position 1 in `pre_output_filter'
.
Inserting `Harf wrapup_run callback' at position 1 in `wrapup_run'.
Inserting `Harf finish_pdffile callback' at position 1 in `finish_pdffile'.
Inserting `Harf glyph_info callback' at position 1 in `glyph_info'.
Lua module: luaotfload-auxiliary 2019-11-10 3.11 luaotfload submodule / auxiliar
y functions
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.set_font_index' at position 2 in `luaotfload.patch_fon
t'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 3 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 4 in `luaotfload.patch_font
'.
Inserting `luaotfload.aux.set_xheight' at position 5 in `luaotfload.patch_font'.
Lua module: luaotfload-multiscript 2019-11-10 3.11 luaotfload submodule / multis
cript
Lua module: luaotfload-tounicode 2019-11-10 3.11 luaotfload submodule / tounicod
e
Inserting `luaotfload.rewrite_fontname' at position 6 in `luaotfload.patch_font'
.
luaotfload | main : initialization completed in 0.132 seconds
expl3 <2019-11-07> L3 programming layer
(/usr/local/texlive/2019/texmf-dist/tex/latex-dev/base/article.cls
Document Class: article 2019/10/25 v1.4k Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex-dev/base/size10.clo
File: size10.clo 2019/10/25 v1.4k Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from /Users/xdzeng/Library/texlive/
2019/texmf-var/luatex-cache/generic/names/luaotfload-names.luc)
\c@part=\count163
\c@section=\count164
\c@subsection=\count165
\c@subsubsection=\count166
\c@paragraph=\count167
\c@subparagraph=\count168
\c@figure=\count169
\c@table=\count170
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen134
)
(/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2019-11-07 L3 programming layer (loader) 

(/usr/local/texlive/2019/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def
File: l3backend-pdfmode.def 2019-04-06 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count171
\l__pdf_internal_box=\box45
))
Package: xparse 2019-10-11 L3 Experimental document command parser
\l__xparse_current_arg_int=\count172
\g__xparse_grabber_int=\count173
\l__xparse_m_args_int=\count174
\l__xparse_v_nesting_int=\count175
)
Package: fontspec 2019/10/19 v2.7d Font selection for XeLaTeX and LuaLaTeX
Lua module: fontspec 2019/10/19 2.7d Font selection for XeLaTeX and LuaLaTeX (/
usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
Package: fontspec-luatex 2019/10/19 v2.7d 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_tmpa_int=\count180
\l__fontspec_tmpb_int=\count181
\l__fontspec_tmpc_int=\count182
\l__fontspec_em_int=\count183
\l__fontspec_emdef_int=\count184
\l__fontspec_strong_int=\count185
\l__fontspec_strongdef_int=\count186
\l__fontspec_tmpa_dim=\dimen135
\l__fontspec_tmpb_dim=\dimen136
\l__fontspec_tmpc_dim=\dimen137

(/usr/local/texlive/2019/texmf-dist/tex/latex-dev/base/fontenc.sty
Package: fontenc 2018/08/11 v2.0j Standard LaTeX package

(/usr/local/texlive/2019/texmf-dist/tex/latex-dev/base/tuenc.def
File: tuenc.def 2018/08/11 v2.0j Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding TU on input line 82.
))
(/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.cfg)
LaTeX Info: Redefining \itshape on input line 3785.
LaTeX Info: Redefining \slshape on input line 3790.
LaTeX Info: Redefining \scshape on input line 3795.
LaTeX Info: Redefining \upshape on input line 3800.
LaTeX Info: Redefining \em on input line 3830.
LaTeX Info: Redefining \emph on input line 3855.
))
luaotfload | cache : Lookup cache loaded from /Users/xdzeng/Library/texlive/2019
/texmf-var/luatex-cache/generic/names/luaotfload-lookup-cache.luc.

Package fontspec Info: Could not resolve font "SourceHanSansSC/BI" (it
(fontspec)             probably doesn't exist).


Package fontspec Info: Could not resolve font "SourceHanSansSC/I" (it probably
(fontspec)             doesn't exist).

luaotfload | aux : font no 29 (nil) does not define feature smcp for script latn
 with language dflt
luaotfload | aux : font no 32 (nil) does not define feature smcp for script latn
 with language dflt

Package fontspec Info: Font family 'SourceHanSansSC(0)' created for font
(fontspec)             'Source Han Sans SC' with options [Ligatures=TeX].
(fontspec)              
(fontspec)              This font family consists of the following NFSS
(fontspec)             series/shapes:
(fontspec)              
(fontspec)             - 'normal' (m/n) with NFSS spec.:
(fontspec)             <->"SourceHanSansSC:mode=node;script=latn;language=DFLT;+
tlig;"
(fontspec)             - 'small caps'  (m/sc) with NFSS spec.: 
(fontspec)             - 'bold' (bx/n) with NFSS spec.:
(fontspec)             <->"SourceHanSansSC/B:mode=node;script=latn;language=DFLT
;+tlig;"
(fontspec)             - 'bold small caps'  (bx/sc) with NFSS spec.: 

LaTeX Info: Redefining \rmfamily on input line 4.

(./test.aux)
\openout1 = test.aux

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.

Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid
(fontspec)             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 4.
LaTeX Font Info:    Redeclaring math accent \acute on input line 4.
LaTeX Font Info:    Redeclaring math accent \grave on input line 4.
LaTeX Font Info:    Redeclaring math accent \ddot on input line 4.
LaTeX Font Info:    Redeclaring math accent \tilde on input line 4.
LaTeX Font Info:    Redeclaring math accent \bar on input line 4.
LaTeX Font Info:    Redeclaring math accent \breve on input line 4.
LaTeX Font Info:    Redeclaring math accent \check on input line 4.
LaTeX Font Info:    Redeclaring math accent \hat on input line 4.
LaTeX Font Info:    Redeclaring math accent \dot on input line 4.
LaTeX Font Info:    Redeclaring math accent \mathring on input line 4.
LaTeX Font Info:    Redeclaring math symbol \colon on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Gamma on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Delta on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Theta on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Lambda on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Xi on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Pi on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Sigma on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Upsilon on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Phi on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Psi on input line 4.
LaTeX Font Info:    Redeclaring math symbol \Omega on input line 4.
LaTeX Font Info:    Redeclaring math symbol \mathdollar on input line 4.
LaTeX Font Info:    Redeclaring symbol font `operators' on input line 4.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `normal' on input line 4.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> TU/SourceHanSansSC(0)/m/n on input line 
4.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `bold' on input line 4.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> TU/SourceHanSansSC(0)/m/n on input line
 4.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  TU/SourceHanSansSC(0)/m/n --> TU/SourceHanSansSC(0)/m/n 
on input line 4.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> TU/SourceHanSansSC(0)/m/it on input lin
e 4.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> TU/SourceHanSansSC(0)/bx/n on input lin
e 4.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> TU/lmss/m/n on input line 4.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/m/n on input line 4.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  TU/SourceHanSansSC(0)/m/n --> TU/SourceHanSansSC(0)/bx/n
 on input line 4.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> TU/SourceHanSansSC(0)/bx/it on input l
ine 4.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> TU/lmss/bx/n on input line 4.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/bx/n on input line 4.
 [1

{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./test
.aux))

Here is how much of LuaTeX's memory you used:
 2947 strings out of 484709
 100000,383344 words of node,token memory allocated
 406 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 48 glue_spec,
 4 attribute_list, 1 write nodes
   avail lists: 1:1,2:15,3:2,4:1,5:21,6:1,7:15,9:7
 16779 multiletter control sequences out of 65536+600000
 33 fonts using 66930515 bytes
 43i,4n,70p,253b,229s stack positions out of 5000i,500n,10000p,200000b,100000s
</Library/Fonts/SourceHanNotoCJK.ttc></Library/Fonts/SourceHanNotoCJK.ttc>
Output written on test.pdf (1 page, 3500 bytes).

PDF statistics: 15 PDF objects out of 1000 (max. 8388607)
 8 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 131072)
 1 words of extra memory for PDF output out of 10000 (max. 100000000)

@zauguin
Copy link
Member

zauguin commented Dec 16, 2019

This is caused by an integer overflow in HarfBuzz, I will send them a PR. If you want to use Source Han Sans/Serif, you will have to use the normal font collections (see https://github.com/adobe-fonts/source-han-sans/releases and https://github.com/adobe-fonts/source-han-serif/releases) until this is fixed upstream.

@stone-zeng
Copy link
Author

After one year, I think this issue has already been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants