Plex Math: pieces of horizontal stretchy brackets and double arrows snap to different pixel rows
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 46/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- tex
- Lĩnh vực
- design
Hướng nghiên cứu
The issue identifies uni23DE.lft, uni23DE.ext and uni23DE.mid and reports similar joins in other horizontal assemblies; it does not name source files or tests. Start by locating the font source and instructions for these glyphs, then reproduce the reported joins at the listed sizes with hinting enabled. Done means the shared strokes align across the tested assemblies without losing crispness or creating brighter pixels at joins.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In IBM Plex Math 1.1.0 (@ibm/plex-math on npm), the pieces of several horizontal stretchy glyphs hint the same stroke with different programs. At many sizes the hinted stroke of the extender lands exactly one pixel above or below the stroke of the end or middle piece next to it, so the assembled glyph has a step at each join. I see this in Chrome and Firefox on Windows on a 1080p screen, both at text sizes and under pinch zoom.
U+23DE (top curly bracket) is an example. The outlines of uni23DE.lft, uni23DE.ext and uni23DE.mid all put the stroke at y = 714 to 780. lft and mid have their own instructions (44 and 68 bytes). ext is a reference to uni23B4.ext, the extender of U+23B4, and uses its 11 bytes of instructions. The three programs round the shared stroke to different pixel rows at some sizes.
Here is U+23DE at 20 px, rendered with FreeType with hinting on and magnified. The top row is the original font; the bottom row is the same font rehinted with ttfautohint, discussed below.
I rendered every horizontal assembly in the MATH table with FreeType, hinting on, from 14 to 80 px in 0.25 px steps, and compared the stroke height on both sides of each join. These have 1 px steps:
| Glyphs | Sizes with a step (of 265) |
|---|---|
| U+21DA, U+21DB (triple arrows) | 83 |
| U+23B5, U+23DD, U+23DF, U+23E1 (bottom brackets) | 63 |
| U+23B4, U+23DC, U+23DE, U+23E0 (top brackets) | 52 |
| U+21D0, U+21D2, U+21D4 (double arrows) | 24 |
The single arrows, harpoons and combining marks have none. I didn't test the vertical assemblies: Windows and FreeType apply hints only in y, so their vertical strokes shouldn't be affected.
To reproduce, open this page on Windows at 100% scaling and look along the rows for steps in the brace:
<!doctype html>
<meta charset="utf-8">
<style>
@font-face { font-family: "IBM Plex Math"; src: url("https://cdn.jsdelivr.net/npm/@ibm/[email protected]/fonts/complete/woff2/IBMPlexMath-Regular.woff2") format("woff2"); }
math { font-family: "IBM Plex Math", math; }
</style>
<div id="rows"></div>
<script>
const sample = `<math><mover><mrow><mi>a</mi><mo>+</mo><mi>b</mi><mo>+</mo><mi>c</mi><mo>+</mo><mi>d</mi></mrow><mo stretchy="true">⏞</mo></mover></math>`;
for (let px = 14; px <= 22; px += 0.25)
document.getElementById("rows").insertAdjacentHTML("beforeend", `<div style="font-size:${px}px">${px}px ${sample}</div>`);
</script>
What I tried on a local copy:
- Removing all instructions makes the pieces line up, but the strokes get blurry at text sizes and the overlapping connectors show as brighter pixels at the joins.
- Rehinting the whole font with ttfautohint at default settings removes the steps at all 265 sizes, but the stroke keeps its real thickness (about 1.3 px at 20 px) and turns grey across rows, as in the bottom row of the image.
- With ttfautohint's strong stem snapping the stroke is crisp more often, but the steps come back (72 sizes for U+23DE).
So I don't think a generic autohinter can fix it. The pieces of each assembly would need to snap the shared stroke edges the same way, for example by rounding them against the same CVT entries.
- Ngôn ngữ chính
- CSS
- Star
- 11.8k
- Fork
- 626
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của IBM/plex
-
Adding Hanja in Plex KRĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
Độ khó 4/5 1-3 giờ Mức phù hợp với người mới 8/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 40/100
-
iBM Plex Sans ArabicĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
IacobIonut01/ReFra#1457 ·
Maintainer thường phản hồi trong vòng 17 ngày
-
[Type] Enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Pin `scope.options.variant` on the `status-light` "Semantic (Dot)" / "Non-semantic (Dot)" relationshipsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdesign-data-spec
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
adobe/spectrum-design-data#1755 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Ok in the chart settings without edits shows the right price axis on a chart whose host hid bothĐang mởbug ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
userFRM/egui-charts#2870 ·
Maintainer thường phản hồi trong vòng 1 ngày