OpenType Optical Bounds 'opbd' feature
Is 'opbd' feature supported? According to the spec[1] this feature is used to define what I think is equivalent to the protrusion values used for optical alignment of the glyphs. I grepped the sources and there seem no be special handling of it, I don't have fonts that use this feature (I didn't look for one) but I'm planning to use it in my fonts and thought I'd check if ConTeXt support it first. This Typophile thread[2] might be interesting too. If fonts are needed I can check for free fonts that implement this, or prepare a font for testing. [1] http://www.microsoft.com/typography/OTSPEC/features_ko.htm#opbd [2] http://typophile.com/node/48738 Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On 12-2-2010 19:03, Khaled Hosny wrote:
Is 'opbd' feature supported? According to the spec[1] this feature is used to define what I think is equivalent to the protrusion values used for optical alignment of the glyphs. I grepped the sources and there seem no be special handling of it, I don't have fonts that use this feature (I didn't look for one) but I'm planning to use it in my fonts and thought I'd check if ConTeXt support it first.
This Typophile thread[2] might be interesting too.
If fonts are needed I can check for free fonts that implement this, or prepare a font for testing.
[1] http://www.microsoft.com/typography/OTSPEC/features_ko.htm#opbd [2] http://typophile.com/node/48738
Indeed I need a test font in order to see how it can be implemented. If there are no fonts we should wonder what the exact spec is. Does fontforge support it? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, Feb 12, 2010 at 07:21:14PM +0100, Hans Hagen wrote:
On 12-2-2010 19:03, Khaled Hosny wrote:
Is 'opbd' feature supported? According to the spec[1] this feature is used to define what I think is equivalent to the protrusion values used for optical alignment of the glyphs. I grepped the sources and there seem no be special handling of it, I don't have fonts that use this feature (I didn't look for one) but I'm planning to use it in my fonts and thought I'd check if ConTeXt support it first.
This Typophile thread[2] might be interesting too.
If fonts are needed I can check for free fonts that implement this, or prepare a font for testing.
[1] http://www.microsoft.com/typography/OTSPEC/features_ko.htm#opbd [2] http://typophile.com/node/48738
Indeed I need a test font in order to see how it can be implemented. If there are no fonts we should wonder what the exact spec is. Does fontforge support it?
I think fontforge supports it, I'll check existing fonts and if I found nothing I'll create one for testing; if there is no fonts using it then we are free to interpret the spec as we will, after all, using our own fonts in our own system :) Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On Fri, Feb 12, 2010 at 07:21:14PM +0100, Hans Hagen wrote:
On 12-2-2010 19:03, Khaled Hosny wrote:
Is 'opbd' feature supported? According to the spec[1] this feature is used to define what I think is equivalent to the protrusion values used for optical alignment of the glyphs. I grepped the sources and there seem no be special handling of it, I don't have fonts that use this feature (I didn't look for one) but I'm planning to use it in my fonts and thought I'd check if ConTeXt support it first.
This Typophile thread[2] might be interesting too.
If fonts are needed I can check for free fonts that implement this, or prepare a font for testing.
[1] http://www.microsoft.com/typography/OTSPEC/features_ko.htm#opbd [2] http://typophile.com/node/48738
Indeed I need a test font in order to see how it can be implemented. If there are no fonts we should wonder what the exact spec is. Does fontforge support it?
I found that the font "fxlbi.otf" (of libertine fonts) has both 'lfbd' and 'rtbd' (left/right optical bounds) but no 'opbd' feature. Now re-reading the spec, I don't see what the values stored in 'opbd' is used for as the application has to consult 'lfbd' or 'rtbd' feature according to the position of the glyph in the line, I asked on OpenType mailing list but I don't expect getting an answer (nobody implemented this feature, except FontForge AFAIK.) My suggestion is to ignore 'opbd' completely and just use the values from 'lfbd'/'rtbd' directly. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On 13-2-2010 18:32, Khaled Hosny wrote:
On Fri, Feb 12, 2010 at 07:21:14PM +0100, Hans Hagen wrote:
On 12-2-2010 19:03, Khaled Hosny wrote:
Is 'opbd' feature supported? According to the spec[1] this feature is used to define what I think is equivalent to the protrusion values used for optical alignment of the glyphs. I grepped the sources and there seem no be special handling of it, I don't have fonts that use this feature (I didn't look for one) but I'm planning to use it in my fonts and thought I'd check if ConTeXt support it first.
This Typophile thread[2] might be interesting too.
If fonts are needed I can check for free fonts that implement this, or prepare a font for testing.
[1] http://www.microsoft.com/typography/OTSPEC/features_ko.htm#opbd [2] http://typophile.com/node/48738
Indeed I need a test font in order to see how it can be implemented. If there are no fonts we should wonder what the exact spec is. Does fontforge support it?
I found that the font "fxlbi.otf" (of libertine fonts) has both 'lfbd' and 'rtbd' (left/right optical bounds) but no 'opbd' feature. Now re-reading the spec, I don't see what the values stored in 'opbd' is used for as the application has to consult 'lfbd' or 'rtbd' feature according to the position of the glyph in the line, I asked on OpenType mailing list but I don't expect getting an answer (nobody implemented this feature, except FontForge AFAIK.) My suggestion is to ignore 'opbd' completely and just use the values from 'lfbd'/'rtbd' directly.
but are these [lr]fbd meant for protruding or for italic correction Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Sun, Feb 14, 2010 at 02:42:30PM +0100, Hans Hagen wrote:
On 13-2-2010 18:32, Khaled Hosny wrote:
On Fri, Feb 12, 2010 at 07:21:14PM +0100, Hans Hagen wrote:
On 12-2-2010 19:03, Khaled Hosny wrote:
Is 'opbd' feature supported? According to the spec[1] this feature is used to define what I think is equivalent to the protrusion values used for optical alignment of the glyphs. I grepped the sources and there seem no be special handling of it, I don't have fonts that use this feature (I didn't look for one) but I'm planning to use it in my fonts and thought I'd check if ConTeXt support it first.
This Typophile thread[2] might be interesting too.
If fonts are needed I can check for free fonts that implement this, or prepare a font for testing.
[1] http://www.microsoft.com/typography/OTSPEC/features_ko.htm#opbd [2] http://typophile.com/node/48738
Indeed I need a test font in order to see how it can be implemented. If there are no fonts we should wonder what the exact spec is. Does fontforge support it?
I found that the font "fxlbi.otf" (of libertine fonts) has both 'lfbd' and 'rtbd' (left/right optical bounds) but no 'opbd' feature. Now re-reading the spec, I don't see what the values stored in 'opbd' is used for as the application has to consult 'lfbd' or 'rtbd' feature according to the position of the glyph in the line, I asked on OpenType mailing list but I don't expect getting an answer (nobody implemented this feature, except FontForge AFAIK.) My suggestion is to ignore 'opbd' completely and just use the values from 'lfbd'/'rtbd' directly.
but are these [lr]fbd meant for protruding or for italic correction
They are meant for protruding, and per the spec should be applied only at the start/end of line. http://www.microsoft.com/typography/OTSPEC/features_ko.htm#lfbd http://www.microsoft.com/typography/OTSPEC/features_pt.htm#rtbd -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On 14-2-2010 17:06, Khaled Hosny wrote:
On Sun, Feb 14, 2010 at 02:42:30PM +0100, Hans Hagen wrote:
On 13-2-2010 18:32, Khaled Hosny wrote:
On Fri, Feb 12, 2010 at 07:21:14PM +0100, Hans Hagen wrote:
On 12-2-2010 19:03, Khaled Hosny wrote:
Is 'opbd' feature supported? According to the spec[1] this feature is used to define what I think is equivalent to the protrusion values used for optical alignment of the glyphs. I grepped the sources and there seem no be special handling of it, I don't have fonts that use this feature (I didn't look for one) but I'm planning to use it in my fonts and thought I'd check if ConTeXt support it first.
This Typophile thread[2] might be interesting too.
If fonts are needed I can check for free fonts that implement this, or prepare a font for testing.
[1] http://www.microsoft.com/typography/OTSPEC/features_ko.htm#opbd [2] http://typophile.com/node/48738
Indeed I need a test font in order to see how it can be implemented. If there are no fonts we should wonder what the exact spec is. Does fontforge support it?
I found that the font "fxlbi.otf" (of libertine fonts) has both 'lfbd' and 'rtbd' (left/right optical bounds) but no 'opbd' feature. Now re-reading the spec, I don't see what the values stored in 'opbd' is used for as the application has to consult 'lfbd' or 'rtbd' feature according to the position of the glyph in the line, I asked on OpenType mailing list but I don't expect getting an answer (nobody implemented this feature, except FontForge AFAIK.) My suggestion is to ignore 'opbd' completely and just use the values from 'lfbd'/'rtbd' directly.
but are these [lr]fbd meant for protruding or for italic correction
They are meant for protruding, and per the spec should be applied only at the start/end of line.
http://www.microsoft.com/typography/OTSPEC/features_ko.htm#lfbd http://www.microsoft.com/typography/OTSPEC/features_pt.htm#rtbd
well, i decided to take a look at the font but it looks like something else ... in that font only digits seem to have such values Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, Feb 23, 2010 at 07:08:10PM +0100, Hans Hagen wrote:
On 14-2-2010 17:06, Khaled Hosny wrote:
I found that the font "fxlbi.otf" (of libertine fonts) has both 'lfbd' and 'rtbd' (left/right optical bounds) but no 'opbd' feature. Now re-reading the spec, I don't see what the values stored in 'opbd' is used for as the application has to consult 'lfbd' or 'rtbd' feature according to the position of the glyph in the line, I asked on OpenType mailing list but I don't expect getting an answer (nobody implemented this feature, except FontForge AFAIK.) My suggestion is to ignore 'opbd' completely and just use the values from 'lfbd'/'rtbd' directly.
but are these [lr]fbd meant for protruding or for italic correction
They are meant for protruding, and per the spec should be applied only at the start/end of line.
http://www.microsoft.com/typography/OTSPEC/features_ko.htm#lfbd http://www.microsoft.com/typography/OTSPEC/features_pt.htm#rtbd
well, i decided to take a look at the font but it looks like something else ... in that font only digits seem to have such values
I guess because no software is supporting this, it was partially implemented in the font. Anyway, existing fonts doesn't really matter; AFAIK, ConTeXt will be the first typesetting system to support it, so we are free to interpret the spec the way that makes sense to us. Having this data in the font is important for Arabic (my main concern) because it have to be glyph not character based. For example, Heh (ه) in its isolated form would have different protrusion value than its final form (ـه), and the only way to do this reliably is to store it in the font itself. If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose. Regards, Khaled
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
-- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose.
I went ahead and patched texgyre pagella to implement lfbd/rtbd features (based on palatino protrusion values from microtype package), attached the font file and the "dirty" python script used to build it. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On 24-2-2010 17:31, Khaled Hosny wrote:
On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose.
I went ahead and patched texgyre pagella to implement lfbd/rtbd features (based on palatino protrusion values from microtype package), attached the font file and the "dirty" python script used to build it.
hm, but who says that those values are the right ones? after thinking a bit about protrusion i dediced that it might make more sense to look at boundingboxes so i wonder how usefull that feature actually is; it might make more sense to misuse it for left/right (also inline) italic correction Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, Feb 24, 2010 at 06:26:01PM +0100, Hans Hagen wrote:
On 24-2-2010 17:31, Khaled Hosny wrote:
On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose.
I went ahead and patched texgyre pagella to implement lfbd/rtbd features (based on palatino protrusion values from microtype package), attached the font file and the "dirty" python script used to build it.
hm, but who says that those values are the right ones?
Nobody, I just wanted to pick some thing that is sensible for a test.
after thinking a bit about protrusion i dediced that it might make more sense to look at boundingboxes so i wonder how usefull that feature actually is; it might make more sense to misuse it for left/right (also inline) italic correction
May be we can use the opbd feature itself for this "misuse"; since I have no idea what values stored in it to be used for, so to avoid clash between italic correction and protrusion values. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On 24-2-2010 19:22, Khaled Hosny wrote:
On Wed, Feb 24, 2010 at 06:26:01PM +0100, Hans Hagen wrote:
On 24-2-2010 17:31, Khaled Hosny wrote:
On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose.
I went ahead and patched texgyre pagella to implement lfbd/rtbd features (based on palatino protrusion values from microtype package), attached the font file and the "dirty" python script used to build it.
hm, but who says that those values are the right ones?
Nobody, I just wanted to pick some thing that is sensible for a test.
after thinking a bit about protrusion i dediced that it might make more sense to look at boundingboxes so i wonder how usefull that feature actually is; it might make more sense to misuse it for left/right (also inline) italic correction
May be we can use the opbd feature itself for this "misuse"; since I have no idea what values stored in it to be used for, so to avoid clash between italic correction and protrusion values.
well, as no one implements it and as it looks like "whever does it first in otf sets the standard" it sounds like a valid approach and indeed it's sort of weird that the spec says that the values for opbd are stored in other features Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 24-2-2010 17:31, Khaled Hosny wrote:
On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose.
I went ahead and patched texgyre pagella to implement lfbd/rtbd features (based on palatino protrusion values from microtype package), attached the font file and the "dirty" python script used to build it.
just wondering ... wouldn't it make more sense to do that kind of things in fea files? that way there can be variants (not hardcoded) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, Feb 24, 2010 at 06:28:53PM +0100, Hans Hagen wrote:
On 24-2-2010 17:31, Khaled Hosny wrote:
On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose.
I went ahead and patched texgyre pagella to implement lfbd/rtbd features (based on palatino protrusion values from microtype package), attached the font file and the "dirty" python script used to build it.
just wondering ... wouldn't it make more sense to do that kind of things in fea files? that way there can be variants (not hardcoded)
Possible, at the engine it doesn't matter if it is a fea file or hardcoded; after loading a fea file it is all the same. Attached a feature file (generated by FF from the previous font, so it is essentially the same). Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On 24-2-2010 17:31, Khaled Hosny wrote:
On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose.
I went ahead and patched texgyre pagella to implement lfbd/rtbd features (based on palatino protrusion values from microtype package), attached the font file and the "dirty" python script used to build it.
to get full protrusion i need to multiply by two so i think that it makes most sense to use full protrusion for punctuation and hyphens and if less is wanted use a factor of 0.5 Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, Feb 24, 2010 at 07:24:08PM +0100, Hans Hagen wrote:
On 24-2-2010 17:31, Khaled Hosny wrote:
On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose.
I went ahead and patched texgyre pagella to implement lfbd/rtbd features (based on palatino protrusion values from microtype package), attached the font file and the "dirty" python script used to build it.
to get full protrusion i need to multiply by two so i think that it makes most sense to use full protrusion for punctuation and hyphens and if less is wanted use a factor of 0.5
But most of the time full protrusion isn't needed, right? I think full protrusion (assuming this is hanging punctuation) can be done in a generic way; protruding the glyph so that all of its bounding box is in the margin, and using font stored protrusion values for regular setting. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On 25-2-2010 13:51, Khaled Hosny wrote:
On Wed, Feb 24, 2010 at 07:24:08PM +0100, Hans Hagen wrote:
On 24-2-2010 17:31, Khaled Hosny wrote:
On Tue, Feb 23, 2010 at 08:57:23PM +0200, Khaled Hosny wrote:
If a real test suite is needed, I can prepare a special copy of one of TeX Gyre fonts for this purpose.
I went ahead and patched texgyre pagella to implement lfbd/rtbd features (based on palatino protrusion values from microtype package), attached the font file and the "dirty" python script used to build it.
to get full protrusion i need to multiply by two so i think that it makes most sense to use full protrusion for punctuation and hyphens and if less is wanted use a factor of 0.5
But most of the time full protrusion isn't needed, right? I think full protrusion (assuming this is hanging punctuation) can be done in a generic way; protruding the glyph so that all of its bounding box is in the margin, and using font stored protrusion values for regular setting.
actually, i only use full protrusion (punctuation and hyphens) subtle protruding (as subtle hz) mostly goes unnoticed as experiments at user group meetings long ago have proven Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Khaled Hosny