parent
97bb0fbce3
commit
e07275163f
@ -751,7 +751,7 @@ fn prepare<'a>(
|
||||
/// See Requirements for Chinese Text Layout, Section 3.2.2 Mixed Text Composition in Horizontal
|
||||
/// Written Mode
|
||||
fn add_cjk_latin_spacing(items: &mut [Item]) {
|
||||
let mut items = items.iter_mut().peekable();
|
||||
let mut items = items.iter_mut().filter(|x| !matches!(x, Item::Meta(_))).peekable();
|
||||
let mut prev: Option<&ShapedGlyph> = None;
|
||||
while let Some(item) = items.next() {
|
||||
let Some(text) = item.text_mut() else {
|
||||
|
BIN
tests/ref/bugs/2650-cjk-latin-spacing-meta.png
Normal file
BIN
tests/ref/bugs/2650-cjk-latin-spacing-meta.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
6
tests/typ/bugs/2650-cjk-latin-spacing-meta.typ
Normal file
6
tests/typ/bugs/2650-cjk-latin-spacing-meta.typ
Normal file
@ -0,0 +1,6 @@
|
||||
// https://github.com/typst/typst/issues/2650
|
||||
#let with-locate(body) = locate(loc => body)
|
||||
|
||||
测a试
|
||||
|
||||
测#with-locate[a]试
|
Loading…
x
Reference in New Issue
Block a user