Giter Site home page Giter Site logo

harfbuzz / harfbuzz Goto Github PK

View Code? Open in Web Editor NEW
3.6K 96.0 584.0 99.41 MB

HarfBuzz text shaping engine

Home Page: http://harfbuzz.github.io/

License: Other

Makefile 0.87% Shell 0.13% Python 2.65% C++ 66.20% C 14.67% Ragel 0.55% Meson 1.20% M4 1.11% CMake 0.51% Hack 11.82% Roff 0.05% Rust 0.25%
opentype fonts c-plus-plus c library unicode text-shaping aat variable-fonts typography

harfbuzz's Introduction

Linux CI Status CircleCI Build Status OSS-Fuzz Status Coverity Scan Build Status Codacy Badge Codecov Code Coverage Packaging status OpenSSF Scorecard

HarfBuzz

HarfBuzz is a text shaping engine. It primarily supports OpenType, but also Apple Advanced Typography. HarfBuzz is used in Android, Chrome, ChromeOS, Firefox, GNOME, GTK+, KDE, Qt, LibreOffice, OpenJDK, XeTeX, PlayStation, Microsoft Edge, Adobe Photoshop, Illustrator, InDesign, Godot Engine, and other places.

xkcd-derived image

For bug reports, mailing list, and other information please visit:

http://harfbuzz.org/

For license information, see COPYING.

Documentation

For user manual as well as API documentation, check: https://harfbuzz.github.io

Download

For tarball releases of HarfBuzz, look here. At the same place you will also find Win32/Win64 binary bundles that include libharfbuzz DLL, hb-view.exe, hb-shape.exe, and all dependencies.

The canonical source tree is available on github.

The API that comes with hb.h will not change incompatibly. Other, peripheral, headers are more likely to go through minor modifications, but again, we do our best to never change API in an incompatible way. We will never break the ABI.

If you are not sure whether Pango or HarfBuzz is right for you, read Pango vs HarfBuzz.

Development

For build information, see BUILD.md.

For custom configurations, see CONFIG.md.

For testing and profiling, see TESTING.md.

To get a better idea of where HarfBuzz stands in the text rendering stack you may want to read State of Text Rendering, though, that document is many years old. Here are a few presentation slides about HarfBuzz at the Internationalization and Unicode Conference over the years:

Both development and user support discussion around HarfBuzz happens on the github.

To report bugs or submit patches please use github issues and pull-requests.

For a comparison of old vs new HarfBuzz memory consumption see this.

Name

HarfBuzz (حرف‌باز) is the literal Persian translation of “OpenType”, transliterated using the Latin script. It also means "talkative" or "glib" (also a nod to the GNOME project where HarfBuzz originates from).

Background: Originally there was this font format called TrueType. People and companies started calling their type engines all things ending in Type: FreeType, CoolType, ClearType, etc. And then came OpenType, which is the successor of TrueType. So, for my OpenType implementation, I decided to stick with the concept but use the Persian translation. Which is fitting given that Persian is written in the Arabic script, and OpenType is an extension of TrueType that adds support for complex script rendering, and HarfBuzz is an implementation of OpenType complex text shaping.

Packaging status of HarfBuzz

Packaging status

harfbuzz's People

Contributors

alerque avatar anthrotype avatar behdad avatar blueshade7 avatar brawer avatar ckitagawa-work avatar dependabot[bot] avatar drott avatar dscorbett avatar ebraminio avatar eroux avatar fanc999-1 avatar fred-wang avatar garretrieger avatar jfkthame avatar khaledhosny avatar konstantinritt avatar lazka avatar mathieuduponchelle avatar mhosken avatar n8willis avatar owtaylor avatar pnacht avatar qxliu76 avatar razrfalcon avatar rsheeter avatar simoncozens avatar tp-m avatar waywardmonkeys avatar xclaesse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

harfbuzz's Issues

Add function for scripts that should disable letter-spacing?

According to Roozbeh these scripts have a cursive connection and as such can't take letter-spacing:

Arabic, Syriac, N'Ko, Manichaean, Psaltar Pahlavi, Mandaic, Mongolian, Phags-pa,
Devanagari, Bengali, Gurmukhi, Modi, Sharada, Syloti Nagri, Tirhuta,
Ogham

Not sure how useful it is to enumerate them somehow in HarfBuzz. @jfkthame WDYT?

Allow specifying OpenType script tag via BCP 47 language extension

From mailing list discussion:

Yes, separate x-prefixes for script and land would be good! (That'd allow for 3-letter script tags).

Sent from my mobile phone.

On 07.05.2015, at 04:28, Martin Hosken [email protected] wrote:

Dear Behdad,

I can extend the BCP 47 extension to also choose the script system if it's
available. Eg, a language setting of "x-hbotdeva" will choose "deva" whereas
"x-hbotdev2" will choose "dev2". This works for script tags that have four
letters (ie, not 'lao ', 'yi ', 'nko ', and 'vai ').

We would only recognize the three-letter ones as language system tag.

This will be useful for choosing 'math' script as well.

+1

Or you could use x-hbscdev2 (as in script) to separate the namespaces.

New Tai Lue just changed model in Unicode

New Tai Lue just changed model from logical encoding (like most Indic) to visual encoding (like Thai, Lao, and Tai Viet).

Almost all data in New Tai Lue is already using the visual model (they basically ignored the Unicode recommendation).

The change is going to officially happen in Unicode 8.0, but I think we should make the change in HarfBuzz immediately, because almost all the data in the language is in visual order (see http://www.unicode.org/L2/L2014/14195-newtailue.txt).

Strange behavior with ccmp lookup & marks

Hello.
It is not very important but I am curious to understand ...
In this minimal font the latin dz digraph is transform to a d followed by a z using a ccmp lookup.
Applying an accent to the digraph then it moves it to the first letter ignoring (for GPOS mark) the separation done by the ccmp lookup.
http:pecita.eu/ccmpDigraph/ccmpDigraph.tar.bz2

"No libtoolize (libtool) found, please install it" on Mac OS X 10.10

When I run ./autogen.sh, I get:

/autogen.sh
-n checking for ragel...
/usr/local/bin/ragel
-n checking for pkg-config...
/usr/local/bin/pkg-config
-n checking for libtoolize...
*** No libtoolize (libtool) found, please install it ***

autogen.sh seems to just to which libtoolize. However, because Mac OS X does include an old version of libtool, the Homebrew environment installs "libtoolize" as "glibtoolize". I wonder if ./autogen.sh could be made aware of that and check for "glibtoolize" first.

Pick script/lang that has 'vert' table

There are cases where input script/lang does not match to what the font has 'vert' table in.

It'd be great if HB has either:

  1. Correct script/lang as needed so that 'vert' applies, or
  2. Have a method to let app know in which script/lang the font has 'vert' in.

Longer description follows.

Scripts/langsys do not work well for multi-scripts languages such as CJK, and historically, different font/engine vendors did different workaround for the problem that engines need to be tolerant to find 'vert' when processing CJK text, sometimes to support broken fonts, or sometimes because of different workaround taken.

Due to this, most implementations display correctly even when fonts have wrong or broken scripts/langsys. Safari/IE renders such pages/fonts correctly. Blink has its own workaround today, but it'd be ideal if HB does this.

Why reorder U+0E3A (Thai Phinthu)?

Hi. Could please inform me why HarfBuzz always reorder U+0E3A (Thai Nighahit) to the lowest stack?

I can't find any particular reason why it should do that for Thai national language. Moreover, it is not desired behavior for some minority languages which use Thai script.

nikahit

The screenshot above, I input Thai consonants & U+0E3A before other low vowels but HarfBuzz still displays it at the lowest position (the first 2 are actual words from Melayu-Pattani, the last one is just for testing mkmk). Compared to FontForge, it should be like a screenshot below - the font with mkmk feature can be found here https://github.com/BoonUni/boonjot).

nikahit-fontforge

Python crashes when HarfBuzz.language_from_string() is used

After #90 I can get most of the *_from_string() function to work from Python, except language_from_string() which cases a “double free or corruption” crash. Running under valgrind shows the following:

==27049== Invalid free() / delete / delete[] / realloc()
==27049==    at 0x4C2B200: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27049==    by 0x770363A: g_boxed_free (in /usr/lib/libgobject-2.0.so.0.4200.2)
==27049==    by 0x7099C5F: boxed_del (pygi-boxed.c:45)
==27049==    by 0x4E808C2: PyObject_Call (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F11BB6: PyEval_CallObjectWithKeywords (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4ED6C2B: slot_tp_del (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4ED1C89: subtype_dealloc (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4ECFED9: tupledealloc (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F15C30: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F18AEF: PyEval_EvalCodeEx (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F16FE3: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F170E9: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)
==27049==  Address 0x9f18ce0 is 0 bytes inside a block of size 3 free'd
==27049==    at 0x4C2B200: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27049==    by 0x770363A: g_boxed_free (in /usr/lib/libgobject-2.0.so.0.4200.2)
==27049==    by 0x7099C5F: boxed_del (pygi-boxed.c:45)
==27049==    by 0x4E808C2: PyObject_Call (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F11BB6: PyEval_CallObjectWithKeywords (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4ED6C2B: slot_tp_del (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4ED1C89: subtype_dealloc (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4ECFED9: tupledealloc (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F15C30: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F18AEF: PyEval_EvalCodeEx (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F16FE3: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F170E9: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)

and

==27049== Invalid free() / delete / delete[] / realloc()
==27049==    at 0x4C2B200: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27049==    by 0xA22AADB: finish (hb-common.cc:229)
==27049==    by 0xA22AADB: free_langs() (hb-common.cc:243)
==27049==    by 0x5455DB1: __run_exit_handlers (in /usr/lib/libc-2.21.so)
==27049==    by 0x5455E04: exit (in /usr/lib/libc-2.21.so)
==27049==    by 0x5440806: (below main) (in /usr/lib/libc-2.21.so)
==27049==  Address 0x9f1e7b0 is 0 bytes inside a block of size 3 free'd
==27049==    at 0x4C2B200: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27049==    by 0x770363A: g_boxed_free (in /usr/lib/libgobject-2.0.so.0.4200.2)
==27049==    by 0x7099C5F: boxed_del (pygi-boxed.c:45)
==27049==    by 0x4E808C2: PyObject_Call (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F11BB6: PyEval_CallObjectWithKeywords (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4ED6C2B: slot_tp_del (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4ED1C89: subtype_dealloc (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4ECFED9: tupledealloc (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F15C30: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F18AEF: PyEval_EvalCodeEx (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F16FE3: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)
==27049==    by 0x4F170E9: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)

I can not really tell what is going on, but it looks like a mismatch between the way the string is allocated and the use of free() here, or a double free. May be there is a magic Introspection keyword to fix this but I don’t know what is it (I tried (transfer full) but it made no difference).

CJK Punctuation in vertical mode

I am facing some issues with glyph choice when using buffer direction TTB. (That's on HarfBuzz master)

./hb-view /usr/share/fonts/truetype/wqy/wqy-microhei.ttc --features=-vert,-vrt2 --font-size 20  --direction ttb "【2009 年 11 月 4 日美國加訊】,「不僅徹生態,遊戲。」" | display

./hb-view /usr/share/fonts/truetype/simsun/simsun.ttc --font-size 20  --direction ttb "【2009 年 11 月 4 日美國加訊】,「不僅徹生態,遊戲。」" | display

Where SimSun is available on Windows, WenQuanYi Micro Hei for example on Ubuntu.

microhei_ttb

simsun_ttb

I've experimented with --features=+vert,+vrt2 and --features=-vert,-vrt2 but that didn't lead to any changes. Am I mising something?

Build failed

*** Building harfbuzz *** [1/38]
make -j 3
make all-recursive
make[1]: Entering directory '/home/aveyond/jhbuild/checkout/harfbuzz'
Making all in src
make[2]: Entering directory '/home/aveyond/jhbuild/checkout/harfbuzz/src'
make[3]: Entering directory '/home/aveyond/jhbuild/checkout/harfbuzz/src/hb-ucdn'
make[3]: Leaving directory '/home/aveyond/jhbuild/checkout/harfbuzz/src/hb-ucdn'
make all-recursive
make[3]: Entering directory '/home/aveyond/jhbuild/checkout/harfbuzz/src'
make[4]: Entering directory '/home/aveyond/jhbuild/checkout/harfbuzz/src'
GEN libharfbuzz.la
GEN harfbuzz-icu.pc
GEN harfbuzz.pc
/usr/bin/ld: .libs/libharfbuzz_la-hb-blob.o: relocation R_X86_64_32 against `hb_blob_destroy' can not be used when making a shared object; recompile with -fPIC
.libs/libharfbuzz_la-hb-blob.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:1097: recipe for target 'libharfbuzz.la' failed
make[4]: *** [libharfbuzz.la] Error 1
make[4]: Leaving directory '/home/aveyond/jhbuild/checkout/harfbuzz/src'
Makefile:1726: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/aveyond/jhbuild/checkout/harfbuzz/src'
Makefile:1018: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/aveyond/jhbuild/checkout/harfbuzz/src'
Makefile:478: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/aveyond/jhbuild/checkout/harfbuzz'
Makefile:409: recipe for target 'all' failed
make: *** [all] Error 2
*** Error during phase build of harfbuzz: ########## Error running make -j 3 *** [1/38]

Fedora 21 Beta

Harfbuzz with Unity3d

Hi,
I would like the help of harfbuzz team to integrate harfbuzz in the unity3d engine so that we render indic fonts. Presently the unity3d engine does not render persian,arabic and indic fonts. I am not sure how to use harfbuzz in unity3d. Can anyone guide/help me in implementing harfbuzz in Unity3d?

Regards,
Abu Saad Papa

Error building harfbuzz

This is the error I get when invoking make:

git.mk: Generating .gitignore
make  all-recursive
make[1]: Entering directory `/home/mimiko/src/harfbuzz'
Making all in src
make[2]: Entering directory `/home/mimiko/src/harfbuzz/src'
../missing --run ragel -e -F1 -o "hb-buffer-deserialize-json.hh.tmp" "hb-buffer-deserialize-json.rl" && \
        mv "hb-buffer-deserialize-json.hh.tmp" "hb-buffer-deserialize-json.hh" || ( rm -f "hb-buffer-deserialize-json.hh.tmp" && false )
../missing --run ragel -e -F1 -o "hb-buffer-deserialize-text.hh.tmp" "hb-buffer-deserialize-text.rl" && \
        mv "hb-buffer-deserialize-text.hh.tmp" "hb-buffer-deserialize-text.hh" || ( rm -f "hb-buffer-deserialize-text.hh.tmp" && false )
../missing --run ragel -e -F1 -o "hb-ot-shape-complex-indic-machine.hh.tmp" "hb-ot-shape-complex-indic-machine.rl" && \
        mv "hb-ot-shape-complex-indic-machine.hh.tmp" "hb-ot-shape-complex-indic-machine.hh" || ( rm -f "hb-ot-shape-complex-indic-machine.hh.tmp" && false )
hb-ot-shape-complex-indic-machine.ri:122:81: parse error
make[2]: *** [hb-ot-shape-complex-indic-machine.hh] Error 1
make[2]: Leaving directory `/home/mimiko/src/harfbuzz/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mimiko/src/harfbuzz'
make: *** [all] Error 2

I tried master and 0.9.24.
0.9.25 complains about Automake 1.13, which is not available.
I'm on Debian Wheezy x86_64, updated and upgraded.

(ignore this)

(sorry, issue went to this repo instead of fonttools, fixed now)

Oriya not shaping correctly in Firefox

Hi,

Testing my typeface in both Firefox and Safari, I've discovered some problems in the shaping of the Reph feature. The window on top is Safari and it shapes it correctly, the window below is Firefox and it doesn't. In Indesign everything works fine.

screen shot 2014-03-06 at 12 34 11

Any idea on why this happens?

Alessia

Three-character ccmp ligatures not working

Various fonts define three-letter ccmp ligatures for modifier tone letters. But they don't seem to be working in HarfBuzz. It seems that a ligature is formed by the first two glyphs, and then the third never forms.

For example, test the sequence 02E8, 02E9, 02E7 in Arial or Noto Sans. I get two glyphs, while I should be getting one glyph.

Substitution of the letters followed by a combined diacritical ?

Dear developers,

I'm afraid to ramble but I have a scabrous question I'd like to submit...

It seems that harfbuzz substitute the letters followed by a combined diacritic with their corresponding base form. Is it a good idea to lose the first alternative? It is a case where the second is worse: when the letter has contextual alternates (and "Ignore combining marks" is set) but not its accentuated form. Contextual alternates are lost, as in the case of aring below.
capture du 2014-09-07 15 13 58

Regards,
Philippe

Double diacritics+CGJ mechanism potentially broken

Unicode has a double diacritic+CGJ mechanism for rendering a diacritic over or under a double diacritic. For example, the sequence u͡͏́i (u + combining double inverted breve + CGJ + combining acute + i) should result in the acute accent rendered above the double breve.

As this doesn't seem to work in HarfBuzz with any of the Windows fonts, Roboto, Noto, or DejaVu, I'm assuming it's a HarfBuzz bug.

Here's the text of the Unicode standard, from Unicode 7.0 (http://www.unicode.org/versions/Unicode7.0.0/ch07.pdf), page 325 and 326:

image

image

Lohit Bengali reordering of i-matra

During improvement of Lohit Bengali under lohit2 project we decided to remove half form which can easily achieve with positioning of base consonant and virama/halant mark.

TTF available @ https://pravins.fedorapeople.org/Lohit-Bengali.ttf

$hb-shape /usr/share/fonts/lohit-bengali/Lohit-Bengali.ttf হ্ণি
[habeng=0+403|viramabeng=0@-90,-21+0|ivowelbeng=2+220|nnabeng=2+464]

Here i think ivowelbeng should get reorderd at initial position.

Harfbuzz version: 0.9.34

[wish] Add "ot-dumb" shaper that only runs GSUB+GPOS but no special shaping

Behdad,

could you add an "ot-dumb" shaper that would only run the font-defined GSUB+GPOS features, but would not perform any script-specific shaping?

That shaper would not perform any "intelligent" shaping, would not split the shaping process into stages (pre-shaping, shaping, post-shaping), would not apply any features by default (i.e. would treat all features as discretionary and off), and would apply all the GSUB then GPOS features at once, in font-defined features order.

Such a shaper would be most useful for testing the features during font development and debugging.

add function to determine if script is cursive

According to roozbeh, those are:

Arabic, Syriac, N'Ko, Manichaean, Psaltar Pahlavi, Mandaic, Mongolian, Phags-pa,
Devanagari, Bengali, Gurmukhi, Modi, Sharada, Syloti Nagri, Tirhuta,
Ogham

For example, letterspacing should be disabled for these scripts.

ICU Hiragana and Katakana should both map to 'kana'

According to OpenType specification for its script tags:
http://www.microsoft.com/typography/otspec/scripttags.htm

Both Hiragana and Katakana are mapped to a same OpenType script tag 'kana'. As of OpenType 1.6, this is the only case where multiple scripts need to map to single OpenType script tag.

This actually should be done in caller side, since collating scripts earlier help to split to less runs and allow ligatures across these scripts, but doing this in HB is also nice to do.

Incorrect cluster information when shaping hebrew using CoreText

$ HB_SHAPER_LIST='ot' ./hb-shape "/System/Library/Fonts/LucidaGrande.ttc" "סְשְ" [shevahebrew=2@64,0+0|shinhebrew=2+1467|shevahebrew=0@-32,0+0|samekhhebrew=0+1361]

$ HB_SHAPER_LIST='coretext' ./hb-shape "/System/Library/Fonts/LucidaGrande.ttc" "סְשְ" [shevawidehebrew=3+0|shinhebrew=2+1467|shevahebrew=1+0|samekhhebrew=0+1361]

If I interpret the utility output correctly, the first digit after the = is the cluster index in both cases.

I would expect the cluster index information from CoreText to be identical to the one returned when using opentype shaping.

This breaks LayoutTests/fast/text/international/hebrew-selection.html in Blink when moving from CoreText to HarfBuzz.

hb-view --width option

pango-view has a --width option which automatically breaks lines that are longer than a specified width. Are there any plans to add something similar to hb-view?

hb-view alignment option?

Hi there!

hb-view is really great to render beautiful text as svg for usage on the web.
It is also possible to use a text file for multiline input.

Now I was wondering if it is possible to align the text to the right or to center it with hb-view.

Any help is highly appreciated.

Thanks
Andreas

Backward compatible issue with pango1.0-1.36.3

When we tried to use up-to-date harfbuzz-ng with pango 1.36.3, we've got a crash case. The detailed stack traces are reported at crbug.com/503858 and a comment in a patch review.

As far as I looked at the stack traces, this one seems to be offending:

0x00007ffff67c92b0 in hb_shape (font=0x32719220ab0, buffer=0x327191e4620, 
features=0x7fffffffcc80, num_features=0)
at ../../third_party/harfbuzz-ng/src/hb-shape.cc:386

So Pango calls hb_shape with invalid features (probably only if num_features == 0) and the current harfbuzz-ng does not like this.

Is it possible not to read features if num_features == 0?

sample.py: AttributeError: 'gi.repository.HarfBuzz' object has no attribute 'buffer_get_glyph_infos'

After compiling today’s (2015-02-09) repo and trying to run src/sample.py with a sample font and text, I’m consistently getting:

Traceback (most recent call last):
  File "sample.py", line 42, in <module>
    infos = hb.buffer_get_glyph_infos (buf)
  File "/usr/local/lib/python2.7/site-packages/gi/module.py", line 313, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/local/lib/python2.7/site-packages/gi/module.py", line 134, in __getattr__
    self.__name__, name))
AttributeError: 'gi.repository.HarfBuzz' object has no attribute 'buffer_get_glyph_infos'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.