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

fix(core): Move the zenkaku width (全角幅; zw) unit into core #1447

Merged
merged 2 commits into from
Jun 22, 2022

Conversation

ctrlcctrlv
Copy link
Member

Where it belongs.

This touches on #1245.

This is blocking #1444, somehow (the manual is extremely brittle as all know well):

[font-fallback] Glyph あ not found in Gentium Book Basic
! Some glyph(s) not available in any fallback font, run with '-d font-fallback' for more detail at documentation/c08-language.sil:244:1: in \subsection after in \book:subsectionfont

! Unable to measure character at:
	documentation/c08-language.sil:244:1: in \subsection after in \book:subsectionfont
	documentation/c08-language.sil: in <file> (\)
	documentation/c07-settings.sil:51:1: in \includetable: 0x40ddce50
	! debug.traceback() did not identify code location
make: *** [Makefile:1451: documentation/sile.pdf] Error 1
make: *** Deleting file 'documentation/sile.pdf'

After much ado I discovered that the problem is that the unit zw (which stands for the width of a zenkaku—i.e. 全角幅) was popping in and out of existence based on the language setting of the document. Of course this won't work.

All units must be permanent. The concept of a zenkaku is not even Japanese-only.

Copy link
Member

@alerque alerque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a stab at this. My (lack of) expertise on CJK has definitely shown through in the hacks in the manual. Speaking of which there is at least one more than needs removing if this works right...

core/settings.lua Show resolved Hide resolved
core/base-shaper.lua Outdated Show resolved Hide resolved
@alerque alerque added bug Software bug issue enhancement Software improvement or feature request labels Jun 18, 2022
@alerque alerque added this to the v0.13.x milestone Jun 18, 2022
@ctrlcctrlv
Copy link
Member Author

@alerque I still want to rewrite ruby.lua, it's a longterm goal of mine. My private version is pretty cool:

I call these bizarre rubies 重ねルビ (kasane-rubi) which means "stacked ruby", or 𝑛重ルビ (𝑛-stacked ruby).

But historically they are not rare.

法令全書 明治7年 第63ページ

image

台湾語仮名

image

韓国語での曲の翻訳

image

But my private version fails at some very important cases. I think the recent work on math.lua, and patches by @Omikhleia, will help a lot. I wouldn't want to release a version that doesn't meet most needs.

@alerque alerque merged commit 2888d6c into sile-typesetter:master Jun 22, 2022
@alerque alerque deleted the zw_unit branch June 22, 2022 11:35
@alerque
Copy link
Member

alerque commented Jun 22, 2022

Oops. My modifications would have been smart if SU.error() was raising an error. It is not. Furthermore it is failing to do what it was supposed to do (finish off a valid PDF file on an aborted run). I'm looking into that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue enhancement Software improvement or feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants