Skip to content

Glyphs overlap and crash #1115

@Yaraslaut

Description

@Yaraslaut

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfontsfont rasterization and text shaping API and platform implementations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions