Khaled Hosny
00060d99f3
[hb-cairo] Silence warning when building with FreeType
...
In file included from ../util/hb-view.cc:33:
In file included from ../util/view-cairo.hh:32:
../util/helper-cairo.hh:102:7: warning: variable 'cairo_face' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (use_hb_draw)
^~~~~~~~~~~
../util/helper-cairo.hh:129:64: note: uninitialized use occurs here
cairo_scaled_font_t *scaled_font = cairo_scaled_font_create (cairo_face,
^~~~~~~~~~
../util/helper-cairo.hh:102:3: note: remove the 'if' if its condition is always true
if (use_hb_draw)
^~~~~~~~~~~~~~~~
../util/helper-cairo.hh:101:32: note: initialize the variable 'cairo_face' to silence this warning
cairo_font_face_t *cairo_face;
^
= nullptr
We know that cairo_face will always be assigned since use_hb_draw will
always be true, but the compiler does not know that.
2 years ago
Behdad Esfahbod
0d98c79b10
[util] Centralize includes again
2 years ago
Behdad Esfahbod
d90ccc1c5c
[view] More includes
2 years ago
Behdad Esfahbod
969914b2b5
[view] Clean up includes
2 years ago
Behdad Esfahbod
ab8b9b4443
[view] Streamline cairo-ft face lifecycle management
2 years ago
Behdad Esfahbod
228a415470
[view-cairo] Minor subpixel-bits
2 years ago
Behdad Esfahbod
74d29cd168
[helper-cairo] Remove a method
2 years ago
Behdad Esfahbod
b1de87b7f1
[cairo] Document get_glyphs() arguments as inout
2 years ago
Behdad Esfahbod
5efb3bc691
[hb-view] Set hb-cairo scale-factor
...
Unused.
2 years ago
Behdad Esfahbod
81c04b0c21
[cairo] Add separate x/y scale factors
2 years ago
Behdad Esfahbod
c38abcb3fb
[cairo] Add x,y args to get_glyphs
2 years ago
Behdad Esfahbod
847ed69547
[cairo] Reorder arguments of a call
2 years ago
Behdad Esfahbod
ea993af8e7
[view] Don't double-slant
2 years ago
Behdad Esfahbod
cf001f6ec7
[cairo] Add constructor from hb_face_t
2 years ago
Behdad Esfahbod
20a50acc91
[hb-cairo] Make hb_cairo_glyphs_from_buffer public
2 years ago
Behdad Esfahbod
a230eb8cf5
[hb-cairo] Factorize hb_cairo_glyphs_from_buffer
...
To be made public.
2 years ago
Behdad Esfahbod
5c3da76a43
[hb-cairo] Change API again
...
We need to work with a hb-font for variations and font-funcs
to be fetched properly.
2 years ago
Behdad Esfahbod
9f7538c260
[hb-cairo] Change API
2 years ago
Matthias Clasen
0d6ee4621e
wip: Make hb-view use hb-cairo
...
This is a quick hack to prove that the
hb-cairo apis work
2 years ago
Matthias Clasen
5d7553d38f
view: Add a --font-palette option
2 years ago
Khaled Hosny
6add69a6ec
[hb-view] Allow building without cairo-ft
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3925
2 years ago
Behdad Esfahbod
2e9b270a49
[hb-view] Fix cairo slanting condition
...
hb-draw already does slanting. If NOT hb-draw, we should slant
through cairo path. Donno why this was untested before.
This was double-slanting with hb-draw, and not slanting without it.
2 years ago
Behdad Esfahbod
0e4f579493
[util/hb-view] Default HB_DRAW to 1
...
See comments.
2 years ago
Wez Furlong
e3548c2069
hb-view: Detect WezTerm and use iterm2 image protocol
...
Similar to the logic that detects iterm2, but look for
TERM_PROGRAM=WezTerm which identifies wezterm is present.
This allows hb-view to output an image directly to the terminal.
2 years ago
Behdad Esfahbod
c0b2f50c0b
[util] Rename template typenames to avoid clashing with actual types
...
Apparently MSVC2015 can confuse them
Fixes https://github.com/harfbuzz/harfbuzz/issues/3379
3 years ago
Behdad Esfahbod
9cc9ffe352
[util/draw] If HB_DRAW is not set, choose depending on cairo version
...
If HB_DRAW=0, don't use it, if HB_DRAW=1, use it, if unset, choose depending
on cairo version
3 years ago
Behdad Esfahbod
6a3dec357c
[util/draw] Use hb-draw in hb-view only if HB_DRAW=1
3 years ago
Behdad Esfahbod
5c558586eb
[util/draw] Apply slant to non-user-fonts as well
3 years ago
Behdad Esfahbod
542f8269cb
[util/draw/ft] Use hb-draw for font-funcs=ft as well
...
If cairo is >= 1.17.5.
This essentially breaks emoji and bitmap fonts for now.
3 years ago
Behdad Esfahbod
5d2df1208a
[util] Use hb-draw to render alternatively to cairo-ft
...
Is automatically enabled if cairo is recent enough, and font-funcs are
not 'ft'.
Uses cairo-user-font backend internally.
3 years ago
Behdad Esfahbod
c98773ebb0
[util/hb-subset] Move output-file validation code into post_parse
4 years ago
Behdad Esfahbod
58bfe40794
[util] Move hb-subset away from main-font-text
4 years ago
Behdad Esfahbod
fd0778aa2a
[util] Use post_parse in output_options_t
4 years ago
Behdad Esfahbod
24a9d8c78d
[util] Use post_parse in font_options_t
4 years ago
Behdad Esfahbod
e4b33d9d36
[util] Use post_parse in face_options_t
4 years ago
Behdad Esfahbod
93bc62e9b2
[util] Move output options into output-options.hh
4 years ago
Behdad Esfahbod
c5337c43e9
[util] Fold helper-cairo.cc into helper-cairo.hh
4 years ago
Khaled Hosny
5091ea7e24
Merge pull request #2733 from astiob/buffer-context-doc
...
[docs] Describe buffer context applicability more explicitly
4 years ago
Ebrahim Byagowi
e412008599
Remove redundant void from C++ sources ( #1486 )
6 years ago
Behdad Esfahbod
c77ae40852
Rename hb-*private.hh to hb-*.hh
...
Sorry for the noise, downstream custom builders. Please adjust.
7 years ago
Behdad Esfahbod
17f40b7cad
Include hb-private.hh more consistently
...
Part of fixing https://github.com/behdad/harfbuzz/issues/585
7 years ago
Behdad Esfahbod
6c0ebd02c9
[util] If font has color, generate PNG with color
9 years ago
Behdad Esfahbod
cd4eb96abb
[util] Add --font-size to hb-shape
...
Also makes hb-view to use 8 bits of subpixel precision and shape at
requested size, instead of always shaping at upem and scaling results.
10 years ago
Behdad Esfahbod
ea5e8a02eb
[util] Plug minor leak
11 years ago
Behdad Esfahbod
9815a88111
[util] List supported output formats in --help output
12 years ago
Behdad Esfahbod
95cefdf96e
Add --utf8-clusters
...
Also fix cairo cluster generation.
13 years ago
Behdad Esfahbod
69b84a8f6c
Fix hb-view surface size calc for vertical text
...
For some reason it doesn't quite work with IranianNastaliq, but
that looks like a font issue.
13 years ago
Behdad Esfahbod
8b8b19056d
[util] Add hb-shape utility
...
Like hb-view, but prints out buffer contents.
The output format is kinda cryptic. Suggestions welcome.
14 years ago
Behdad Esfahbod
5ddd9cc499
Minor
14 years ago
Behdad Esfahbod
4451168e5d
Fix binary stdin/stdout io in Windows
...
Make --font-file accept "-" to mean stdin, and have it work
in Windows too!
14 years ago