projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0475ef2
)
[python] Hook up sample debugger
author
Behdad Esfahbod
<behdad@behdad.org>
Fri, 18 Dec 2015 19:53:40 +0000
(19:53 +0000)
committer
Behdad Esfahbod
<behdad@behdad.org>
Fri, 18 Dec 2015 19:53:40 +0000
(19:53 +0000)
src/sample.py
patch
|
blob
|
history
diff --git
a/src/sample.py
b/src/sample.py
index
f8d2216
..
19a4fdc
100755
(executable)
--- a/
src/sample.py
+++ b/
src/sample.py
@@
-33,6
+33,12
@@
hb.font_set_scale (font, upem, upem)
hb.ot_font_set_funcs (font)
buf = hb.buffer_create ()
+class Debugger(object):
+ def message (self, buf, font, msg, data, _x_what_is_this):
+ print(msg)
+ return True
+debugger = Debugger()
+hb.buffer_set_message_func (buf, debugger.message, 1, 0)
hb.buffer_add_utf8 (buf, text.encode('utf-8'), 0, -1)
hb.buffer_guess_segment_properties (buf)