freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][gsoc-2022-chariri-3] * src/ftinspect/engi


From: Charlie Jiang (@cqjjjzr)
Subject: [Git][freetype/freetype-demos][gsoc-2022-chariri-3] * src/ftinspect/engine/stringrenderer.cpp: Fix infinite loop.
Date: Mon, 05 Sep 2022 07:55:51 +0000

Charlie Jiang pushed to branch gsoc-2022-chariri-3 at FreeType / FreeType Demo Programs

Commits:

  • 57b34f0b
    by Charlie Jiang at 2022-09-05T15:54:21+08:00
    * src/ftinspect/engine/stringrenderer.cpp: Fix infinite loop.
    
    Don't limit the glyph position and exit too early, or the loop in `render`
    function won't stop forever. Also, since the string can be moved by the
    mouse, there's no point to limit the line position in the canvas viewport..
    

1 changed file:

Changes:

  • src/ftinspect/engine/stringrenderer.cpp
    ... ... @@ -522,9 +522,6 @@ StringRenderer::renderLine(int x,
    522 522
                                int offset,
    
    523 523
                                bool handleMultiLine)
    
    524 524
     {
    
    525
    -  if (x < 0 || y < 0 || x > width || y > height)
    
    526
    -    return 0;
    
    527
    -
    
    528 525
       y = height - y; // change to Cartesian coordinates
    
    529 526
     
    
    530 527
       FT_Vector pen = { 0, 0 };
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]