[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48446] uicontrol extent returns sum of glyph
From: |
Andreas Weber |
Subject: |
[Octave-bug-tracker] [bug #48446] uicontrol extent returns sum of glyph width instead sum of advance width |
Date: |
Fri, 8 Jul 2016 12:18:06 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.8.0 |
URL:
<http://savannah.gnu.org/bugs/?48446>
Summary: uicontrol extent returns sum of glyph width instead
sum of advance width
Project: GNU Octave
Submitted by: andy1978
Submitted on: Fri 08 Jul 2016 12:18:03 PM GMT
Category: Plotting with OpenGL
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
Consider following code:
close all
graphics_toolkit qt
figure
t = uicontrol ("style", "text");
set (t, "string", "ABCDEFGH");
get (t, "extent")
ans =
1 1 59 11
If I make a screenshot and measure the real width its approx 80 pixels.
As far as I can see the code in ft-text-renderer.cc
ft_text_renderer::compute_bbox sums up the glyph width and not the "advance
width" (https://www.freetype.org/freetype2/docs/glyphs/glyphs-3.html) so the
space between the glyphs is missing from the sum.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48446>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48446] uicontrol extent returns sum of glyph width instead sum of advance width,
Andreas Weber <=