您好,
綠色的「水平線」測量值是準確的(您可能希望它大約為 0)。不幸的是,「頁尾到文字頂部」(Bottom of header to top of text)的設定不可靠。計算其數值的數學過程很複雜,取決於字體,而且目前是不正確的。
不知何故,我無法成功貼上圖片,但是……首先,
1. 將(綠色)水平線數值設為 0pt
2. 將紫色的「頁尾到文字頂部」(bottom of header to top of text)設為字體高度的一半左右。
3. 調整位置,使水平線正確地落在基線上。對於 Charis 字體,一半是合適的;如果我没記錯的話,對於 Arial,0.2 左右會更好。
4. 記住這個偏移量。
5. 將數值設為您實際想要的值,並加上偏移量。
出了什麼問題?
紫色數值用於計算旁邊的藍色數值,出於歷史原因,該數值代表從頁面頂部到包含文字的框頂部的距離。不幸的是,該框包含了字體設計者決定為變音符號預留的空間。對於 Charis,字體的「上升高度」(ascent)大約是字體高度的 1.5 倍,但對於 Arial 則是 1.2 倍。
要計算正確的偏移量,Python 使用者介面需要 (a) 確定頁尾中使用了哪些字體,(b) 某種方式讀取字體以確定哪一個具有最高的上升高度。
或者,TeX 中的計算可以以不同的方式進行,但這會破壞現有專案。
目前,我們有一個猜測,這經常是錯誤的,但實際上不會破壞任何東西……
Hi,
The green "horizontal rule" measure is accurate (you probably want it to be about 0). Unfortunately the 'Bottom of header to top of text' setting is unreliable. The maths to work it out is complex, depends on the font, and currently wrong.
I can't successfully past an image, for some reason, but... to start with,
1. set the (green) horizontal rule figure to 0pt
2. Set the purple 'bottom of header to top of text' to, say half the font height.
3. Adjust so the horizontal line is sitting on the rule properly. Half is good for charis, 0.2 or so is better for Arial, if I remember correctly.
4. Remember the offset.
5. Set values how you actually want them to be, adding in the offset.
What's going wrong?
The purple figure is used to calculate the blue figure beside it, which for historical reasons is the distance from the top of the page to the top of the box containing the text. Unfortunately, that box includes the space the font designers decided to leave for accents. For Charis, the 'ascent' of the font is about 1.5 times the font height, but for Ariel it is 1.2 times.
To calculate the correct offset, The Python user interface would need to (a) work out which font(s) are in use in the header, (b) somehow read the font(s) to determine which one has the highest ascent.
Alternatively, the calculation in TeX could be done in a different way, which would break existing projects.
At the moment, we have a guess, which is frequently wrong, but doesn't actually break anything...
機器翻譯自 English