question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Wish] "Dump tables as hex data" option in TTX

See original GitHub issue

There should be a “Dump tables as hex data” option in TTX.

My actual solution is, to temporarily rename some py files in fontTools\ttLib\tables\ with the help of batch files like these:

@echo off
call FDKvars

for %%f in (%tab%*_?_*.*) do (
if not %%~nf.py==C_F_F_.py if not %%~nf.py==_g_l_y_f.py if not %%~nf.py==_h_e_a_d.py if not %%~nf.py==_h_h_e_a.py if not %%~nf.py==_l_o_c_a.py if not %%~nf.py==_m_a_x_p.py if not %%~nf.py==_p_o_s_t.py if exist "%%~dpnf.pyc" del "%%~dpnf.pyc"
if not %%~nf.py==C_F_F_.py if not %%~nf.py==_g_l_y_f.py if not %%~nf.py==_h_e_a_d.py if not %%~nf.py==_h_h_e_a.py if not %%~nf.py==_l_o_c_a.py if not %%~nf.py==_m_a_x_p.py if not %%~nf.py==_p_o_s_t.py if exist "%%~dpnf.py" ren "%%~dpnf.py" "%%~nf.pyNotHex"
)
@echo most tables in Hex-Mode now
ping 127.0.0.1 -n 3 >NUL

and back to decompile mode:

@echo off
call FDKvars

for %%f in (%tab%*_?_*.*) do (
if exist "%%~dpnf.pyc" del "%%~dpnf.pyc"
if exist "%%~dpnf.pyNotHex" ren "%%~dpnf.pyNotHex" "%%~nf.py"
)
@echo all tables in Decompile-Mode now
ping 127.0.0.1 -n 3 >NUL

The TTX command for that would look like this

TTX -s (split all tables in decompile mode) -thex (except from the following ones, which you put out as hex data)


And if you want to split all tables in hex mode:

TTX -s (split all tables) -hex (in hex mode)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
justvanrossumcommented, Mar 28, 2016

So the reason you want this feature is because some years ago TTX failed to dump a GPOS table. Or maybe the table was corrupt. And you don’t 100% trust TTX. But you don’t give us any leads or even reasons, so you’re going by pure speculation at this point and are pretty much spreading rumors.

In short:

  • If FontTools/TTX fails to dump a table, and the table is not corrupt, it’s a bug and we should know about it
  • If FontTools/TTX damages font data in any way, it’s a bug and we should know about it.

Adding a hex feature is not helping any of this.

0reactions
HinTakcommented, Apr 1, 2016

Actually I added this feature to the Font Validator ( https://github.com/HinTak/Font-Validator ) a month ago and not pushed out to the public branch yet. The reason why I added this was that people was talking about Windows 10 starting to using the - antique?- Truetype “meta” table in new ways. So I extended the generic “unknown” table to support hex dumps, just so I can look at the non-OT table and see what’s inside.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I optimize a mysqldump of a large database?
--quick This option tells mysqldump to write dump output as it reads each row from the server, which might be useful for large...
Read more >
MySQL dump by query - Stack Overflow
By default, mysqldump will include DROP TABLE and CREATE TABLE statements in its output. Therefore, if you wish to not delete all the...
Read more >
Export blobs confus(ed,ing) - of (at least) two minds #1438
The browser provides a "binary" view of blob data that is handy ... Add "Hex dump files" as an export option when data...
Read more >
mysqldump - FreeBSD
To dump tables row by row, use the --quick option (or --opt, ... Prior to MySQL 5.4.2, this option has no effect for...
Read more >
How to read and parse UART HEX data? - ESPHome
I am in a little above my head and hope someone can nudge me in the right direction. Goal: read and parse hex...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found