razrfalcon / ttf-explorer Goto Github PK
View Code? Open in Web Editor NEWA simple tool to explore a TrueType font content as a tree
License: MIT License
A simple tool to explore a TrueType font content as a tree
License: MIT License
First up, I wanted to pass on my thanks for building this tool. I find it very useful for investigating font related issues.
Whilst building out gvar
support in Allsorts I noticed a bug in the reading of the deltas:
ttf-explorer/src/tables/gvar.cpp
Line 51 in ff6eab3
This code can end up reading too many deltas. It's supposed to stop when a delta for for each point number has been read but I'm seeing it read more than that (also verified against ttx
from fonttools):
Packed delta data does not include the total number of delta values within the data. Logically, there are deltas for every point number or CVT index specified in the point-number data. Thus, the count of logical deltas is equal to the count of point numbers specified for that tuple variation table.
โ https://learn.microsoft.com/en-us/typography/opentype/spec/otvarcommonformats#packed-deltas
I understand if addressing this is not a priority, just thought I'd mention it.
I compiled it on a linux system with qmake && make
, and when I run the executable it immediately segfaults.
$ gdb ttf-explorer
GNU gdb (GDB) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ttf-explorer...
(gdb) r
Starting program: /home/specious/c3/ttf-explorer/ttf-explorer
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
QtPrivate::RefCount::ref (this=0x0) at /usr/include/qt/QtCore/qrefcount.h:55
55 int count = atomic.loadRelaxed();
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
QBasicAtomicInteger<int>::loadRelaxed (this=<optimized out>, this=<optimized out>) at /usr/include/qt/QtCore/qbasicatomic.h:107
107 T loadRelaxed() const noexcept { return Ops::loadRelaxed(_q_value); }
(gdb) b
Breakpoint 1 at 0x555555567fa0: file /usr/include/c++/12.1.0/bits/atomic_base.h, line 486.
(gdb) backtrace
#0 QBasicAtomicInteger<int>::loadRelaxed (this=<optimized out>, this=<optimized out>) at /usr/include/qt/QtCore/qbasicatomic.h:107
#1 QtPrivate::RefCount::ref (this=0x0) at /usr/include/qt/QtCore/qrefcount.h:55
#2 0x00005555555666f9 in _sub_I_65535_0.0 ()
#3 0x00007ffff67b43be in __libc_start_main () from /usr/lib/libc.so.6
#4 0x0000555555566ea5 in _start () at ../sysdeps/x86_64/start.S:115
(gdb)
Shared libraries linked against:
$ ldd ttf-explorer
linux-vdso.so.1 (0x00007ffd689d3000)
libQt5Widgets.so.5 => /usr/lib/libQt5Widgets.so.5 (0x00007fee20bbc000)
libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x00007fee20556000)
libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007fee20034000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007fee1ffae000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fee1fd77000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fee1fc90000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fee1fc6e000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fee1fa62000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007fee1fa2b000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fee1fa11000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007fee1f928000)
libmd4c.so.0 => /usr/lib/libmd4c.so.0 (0x00007fee1f912000)
libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007fee1f832000)
libdouble-conversion.so.3 => /usr/lib/libdouble-conversion.so.3 (0x00007fee1f81c000)
libicui18n.so.71 => /usr/lib/libicui18n.so.71 (0x00007fee1f4ea000)
libicuuc.so.71 => /usr/lib/libicuuc.so.71 (0x00007fee1f2eb000)
libpcre2-16.so.0 => /usr/lib/libpcre2-16.so.0 (0x00007fee1f25a000)
libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007fee1f1b1000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007fee1f072000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fee212f8000)
libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007fee1efba000)
libGLX.so.0 => /usr/lib/libGLX.so.0 (0x00007fee1ef87000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007fee1eeb8000)
libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007fee1ee96000)
libcap.so.2 => /usr/lib/libcap.so.2 (0x00007fee1ee88000)
libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007fee1ed3f000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007fee1ed15000)
liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007fee1ecf2000)
libicudata.so.71 => /usr/lib/libicudata.so.71 (0x00007fee1cfed000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007fee1cf74000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fee1ce31000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007fee1ce1e000)
libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007fee1ce10000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007fee1cdea000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fee1cde5000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fee1cdb8000)
libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007fee1cd95000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fee1cd90000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fee1cd88000)
I tried previous git commits with the same result.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.