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

Glyphs overlap and crash #1115

Closed
Yaraslaut opened this issue Jun 6, 2023 · 0 comments · Fixed by #1117
Closed

Glyphs overlap and crash #1115

Yaraslaut opened this issue Jun 6, 2023 · 0 comments · Fixed by #1117
Labels
bug Something isn't working fonts font rasterization and text shaping API and platform implementations

Comments

@Yaraslaut
Copy link
Member

Yaraslaut commented Jun 6, 2023

Contour Terminal version

Contour Terminal Emulator 0.3.13-master-12703311

Installer source

Github: source code cloned

Operating System

Arch

Architecture

x86-64

Other Software

No response

Steps to reproduce

code that creates this issue

use std::{thread, time::Duration};


fn print_u32(cha:u32)
{
    print!(
        "{}",
        match std::char::from_u32(cha) {
            Some(c) => c,
            None => '?',
        }
    );
}

fn print_u32_with_index(cha:u32)
{
    println!(
        "{}: {}",
        cha,
        match std::char::from_u32(cha) {
            Some(c) => c,
            None => '?',
        }
    )
}

fn wait(mils:u64)
{
    thread::sleep(Duration::from_millis(mils));
}

fn output_cha(cha_init:u32, cha_size:u32, print: fn(u32))
{
    let mut cha : u32 = cha_init;
    let mut counter = 0;
    while  cha < cha_init + cha_size
    {
        cha +=1;
        counter +=1;
        print(cha);

        if counter == 100
        {
            counter = 0;
            println!("");
            println!("{}", cha as f32 / (cha_size + cha_init) as f32);
            wait(100);
        }
    }
}


fn main() {
    println!("Output of Plane 1 unicode");
    let pr = print_u32; // print_u32_with_index;
    output_cha(0,55634,pr);
    wait(1000);

    println!("Output of Plane 2 unicode");
    output_cha(55634,23276,pr);
    wait(1000);

    println!("");
    println!("Output of Plane 3 unicode");
    output_cha(55634 + 23276, 60873,pr);
    wait(1000);
}

Expected Behavior

No response

Actual Behavior

image

some values and assert

_gridMetrics.baseline: 4
glyph.position.y: -11
yMax: -7
yMin: -16
bitmapsize.height: 9
[/home/yaraslau/repo/contour/src/vtrasterizer/TextRenderer.cpp:863] Precondition failed. rowCount <= unbox<unsigned>(glyph.bitmapSize.height)

Additional notes

Example of alacritty
image

@Yaraslaut Yaraslaut added the bug Something isn't working label Jun 6, 2023
@christianparpart christianparpart added the fonts font rasterization and text shaping API and platform implementations label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fonts font rasterization and text shaping API and platform implementations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants