Re: [HarfBuzz] Default OpenType features (beginner's question)

2020-10-09 Thread Nikolay Sivov
On Fri, Oct 9, 2020 at 11:10 AM Patrick wrote: > Hello all, > > does harfbuzz enable OpenType features by default? And if yes, is > there a list of the default enabled features? > > When I load a font, for example CrimsonPro, I get standard ligatures > (fi for example). Where is this activated?

Re: [HarfBuzz] Alternate/random glyphs

2020-02-12 Thread Nikolay Sivov
On Wed, Feb 12, 2020 at 8:58 PM Aleš Mlakar wrote: > Hey all, > I've been trying to mimic font shaping in Adobe Indesign with Harfbuzz, > most of it works great, but when random/alternate glyphs (for the fonts > that have multiple glyphs for the same code point) are used it's not even > remotely

Re: [HarfBuzz] Beginners question on unicode values

2020-02-04 Thread Nikolay Sivov
Hi, Patrick. Yes, it's not something that you should do. Character maps define mapping in character -> glyph direction. Mapping in opposite direction is not going to work, because m characters map to n glyphs in general, and there could be glyphs that are not referenced by character map at all,

Re: [HarfBuzz] Support for Stylistic Sets

2019-09-15 Thread Nikolay Sivov
On Sun, Sep 15, 2019 at 5:33 AM Eli Zaretskii wrote: > > Date: Sat, 14 Sep 2019 21:33:00 +0100 > > From: Richard Wordingham > > Cc: harfbuzz@lists.freedesktop.org > > > > On Sat, 14 Sep 2019 21:15:04 +0300 > > Eli Zaretskii wrote: > > > > > > Date: Sat, 14 Sep 2019 18:13:25 +0100 > > > > From:

Re: [HarfBuzz] Support for Stylistic Sets

2019-09-14 Thread Nikolay Sivov
On Sat, Sep 14, 2019 at 4:54 PM Eli Zaretskii wrote: > Hi, > > AFAIU, HarfBuzz does support Stylistic Sets, but it is not clear to me > what should an application do to request glyphs corresponding to a > certain stylistic set. > > Suppose an application wants to display a text string using a

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-24 Thread Nikolay Sivov
On Fri, May 24, 2019 at 8:45 PM Konstantin Ritt wrote: > Hi Behdad, > > That was just a glance example of the font table referencing GDI-HB bridge. > Feel free to use it in hb- if you like it ;P > > As for font-funcs, I doubt GDI is a subject of interest these days. I > might be wrong here,

Re: [HarfBuzz] Why harfbuzz isn't/couldn't/shouldn't provide separate [optional] API for glyph/positioning?

2018-02-25 Thread Nikolay Sivov
On 2/26/2018 5:28 AM, Behdad Esfahbod wrote: > > Two things stand out: > >   - There's a lot of duplicate info going into both calls, > >   - There's also a lot data coming out of the first call just to go > directly into the second; namely pCharPropsand pGlyphProps. > > Those two very

Re: [HarfBuzz] Compiling Harfbuzz without dependencies

2017-08-23 Thread Nikolay Sivov
On 23.08.2017 20:57, Daniel Ribeiro Maciel wrote: > Hi guys, > > I'm using 'stb_truetype.h' to render my text and I'm wondering if it is > possible to compile Harfbuzz without depending on 'freetype' or any > other such library since I already got one. > > If not, what would it take for removing

Re: [HarfBuzz] persian numerals

2016-09-12 Thread Nikolay Sivov
On 12.09.2016 19:09, Eduardo Castiñeyra wrote: > Hi, > > Can hb be configured to automatically replace the numerals according to > the language of the paragraph ? > > I'm not sure how to address this. I can tell that at least with Windows shaping engines this is a matter of additional

Re: [HarfBuzz] Turning off ligatures and kerning

2016-07-01 Thread Nikolay Sivov
On 02.07.2016 2:11, Kelvin Ma wrote: > How can I tell if a feature is enabled by default? Is it constant across > scripts? You can tell by looking at documentation, or source code. No, it's not constant and depends on script/shaper used. > And are feature values always True/False > Already

Re: [HarfBuzz] hb_shape, hb_feature_from_string and using hb_feature_t *features

2016-02-03 Thread Nikolay Sivov
On 03.02.2016 21:33, Liam wrote: > Hello again, > > I have been reviewing the tutorial provided with the source code for > harfbuzz and I am still uncertain on how to tell 'hb_shape' to use a > different glyph for a character in a buffer. > > I have a string 'Coffee Time' and when I add that

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-23 Thread Nikolay Sivov
On 24.12.2015 6:03, Jonathan Blow wrote: > The most frustrating thing about sending mail to a mailing list asking a > question is that everyone treats you like a junior programmer. > > >>> I am not able to conceive of any version of "render glyph" whose >>> implementation does not involve adding

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-23 Thread Nikolay Sivov
On 24.12.2015 7:35, Jonathan Blow wrote: >> >> >> Offsets are adjustments accumulated during shaping, bearings are design >> glyph metrics. Instead of using metrics you should be using actual glyph >> box, CBox or BBox in freetype terms. > > > ​I don't think either of these sentences is correct.

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-23 Thread Nikolay Sivov
On 24.12.2015 1:37, Jonathan Blow wrote: >> >> >> >> FreeType does not give you any offsets. Unless you mean the side >> bearings, but they are very different things and shouldn’t be used for >> glyph placement at all. You are getting 0 offsets because either the >> font does not do any special

Re: [HarfBuzz] Some beginner questions about using Harfbuzz API

2015-11-30 Thread Nikolay Sivov
On 30.11.2015 20:33, Deepak Jois wrote: I am trying to build a Lua interface to Harfbuzz that I can hopefully use with LuaTeX some day. I have got something working after taking inspiration from the harfbuzz-tutorial code[2], and the Lua bindings[3] in Simon Cozen’s SILE package. What I have

Re: [HarfBuzz] List OpenType features

2015-11-18 Thread Nikolay Sivov
On 18.11.2015 15:21, Edu García wrote: Hi, What function(s) should I use to list all the features a particular OpenType font supports? Probably hb_ot_layout_table_get_feature_tags(). Thanks ___ HarfBuzz mailing list

Re: [HarfBuzz] List OpenType features

2015-11-18 Thread Nikolay Sivov
On 19.11.2015 0:45, Edu García wrote: It worked, as expected :). However, I'm getting some curious results, and I'm not sure if it's because of my C rustiness or the fact that I'm running Harfbuzz with Emscripten, but just in case, I'll ask: With this simple code: unsigned int count = 80;

Re: [HarfBuzz] List OpenType features

2015-11-18 Thread Nikolay Sivov
Thanks again! On Thu, Nov 19, 2015 at 9:43 AM, Nikolay Sivov <bungleh...@gmail.com <mailto:bungleh...@gmail.com>> wrote: On 19.11.2015 0:45, Edu García wrote: It worked, as expected :). However, I'm getting some curious results, and I'm not

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-26 Thread Nikolay Sivov
On 26.10.2015 11:30, Simon Cozens wrote: On 09/10/2015 15:09, Khaled Hosny wrote: should just use the typographical ascender/descender of the font and hence not need glyph bounding boxes in Sile at all. Yes please, an approach similar to what browsers do would be much appreciated. OK; I've

Re: [HarfBuzz] Different results when shaping sub-sections of text

2015-10-07 Thread Nikolay Sivov
On 07.10.2015 14:41, Jamie Dale wrote: Thanks for the info. I actually started working with the extracted cluster information right before you sent this message, although that was to minimise the shaping requests I need to make by extracting the info (where possible) from the shaped data for the

Re: [HarfBuzz] No kerning?

2015-10-06 Thread Nikolay Sivov
On 06.10.2015 0:27, Behdad Esfahbod wrote: The version of the font from Jamie *does* have a kern table. Ooh, sorry for the noise then. ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Nikolay Sivov
On 05.10.2015 22:32, Jamie Dale wrote: The images below are using the Roboto font, and show the output from each implementation. The top image is using our "kerning only" implementation, and the bottom image is using HarfBuzz. Note that the "T" and "e" characters are further apart in the bottom

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Nikolay Sivov
-Jamie. On 5 October 2015 at 20:49, Nikolay Sivov <bungleh...@gmail.com <mailto:bungleh...@gmail.com>> wrote: On 05.10.2015 22:32, Jamie Dale wrote: The images below are using the Roboto font, and show the output from each implementation. The top image

Re: [HarfBuzz] DirectWrite backend for HarfBuzz

2015-09-11 Thread Nikolay Sivov
On 11.09.2015 9:11, Ebrahim Byagowi wrote: * It uses DirectWrite GDI Interop instead IDWriteFontFileStream for loading the font (and many parts of the patch is actually copied from uniscribe

Re: [HarfBuzz] DirectWrite backend for HarfBuzz

2015-09-11 Thread Nikolay Sivov
ou very much :) On Fri, Sep 11, 2015 at 11:41 AM, Nikolay Sivov <bungleh...@gmail.com <mailto:bungleh...@gmail.com>> wrote: The only reason to use GdiInterop is to enable GDI font substitution/resolution. If you don't need that dwrite way would be to get system font collectio

Re: [HarfBuzz] Kerning, glyph width, and x advance

2015-09-04 Thread Nikolay Sivov
On 04.09.2015 9:56, Simon Cozens wrote: On 04/09/2015 15:50, Behdad Esfahbod wrote: You need the advance width, and you can get that using hb_font_get_glyph_h_advance(). Aha! And the kerned adjustment is the difference between the glyph's h advance and the shaped x_advance... Yes, that seems

[HarfBuzz] [PATCH] Fix 'since' doc header entries for font/face API

2015-09-03 Thread Nikolay Sivov
Some of those were introduced in 0.6.0, but I used 0.9.2 for consistency. From 8a1dad8d6d9ea005a67cf6a3e0113ad56f5dc731 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov <nsi...@codeweavers.com> Date: Thu, 3 Sep 2015 11:39:48 +0300 Subject: [PATCH] Fix 'since' doc header entries for font/fa

Re: [HarfBuzz] [PATCH] Fix 'since' doc header entries for font/face API

2015-09-03 Thread Nikolay Sivov
On 03.09.2015 13:26, Behdad Esfahbod wrote: Thanks Nikolay. Applied. Cool, will take care of the rest. On Thu, Sep 3, 2015 at 1:13 PM, Nikolay Sivov <bungleh...@gmail.com <mailto:bungleh...@gmail.com>> wrote: Some of those were introduced in 0.6.0, but

Re: [HarfBuzz] Using FreeType load flags

2015-08-28 Thread Nikolay Sivov
On 28.08.2015 14:41, Jamie Dale wrote: We don't handle any load_flags. That definitely has API implications. :( FreeType works in 26.6 mode. Clients can decide to use that mode, and everything would work fine. However, we also abuse this API for performing in font-space, but don't pass

Re: [HarfBuzz] Unicode ignorables treatment

2015-08-24 Thread Nikolay Sivov
A little update to this. With Win10 release naturally I tried to run our dwrite/usp10 tests on it, and as it usually happens with new major release got some new failures - we're using Tahoma font for those tests for Latin strings (mainly because it exists on all windows version we care about,

Re: [HarfBuzz] Unicode ignorables treatment

2015-07-28 Thread Nikolay Sivov
. On 28.07.2015, at 11:46, Nikolay Sivov bungleh...@gmail.com wrote: Hello, I had a brief chat with Behdad on irc the other day, and he suggested to move it here. I'm currently considering using hb as a shaper in Wine's DirectWrite replacement; I put together a simple prototype that uses