Discussion:
[ft-devel] MultipleMaster: no setweightvector?
Chris Liddell
2017-12-19 11:42:27 UTC
Permalink
I'm messing with Freetype's MultipleMaster Type 1 support, and I notice
there's no way to directly set the weight vector. That's a bit of a pain
because working backwards from the weight vector values really isn't
viable, and Adobe does let you set the weight vector directly.

I'm guessing setting the weight vector directly isn't included because
it wasn't originally part of Adobe's MM usage.

I'd like to add the ability to set/get the weight vector directly
(FT_Set/Get_MM_Weight_Vector), but before I do the work, and submit a
patch, I wanted to check if there was a specific reason such a call
wasn't included originally (other than not being part of the Adobe's
original MM support)?

If no one knows, or there was no such reason, then I'll put a patch
together.

Chris
Werner LEMBERG
2017-12-21 07:47:49 UTC
Permalink
Post by Chris Liddell
I'm guessing setting the weight vector directly isn't included
because it wasn't originally part of Adobe's MM usage.
Maybe. Another reason was probably the goal to have a uniform
interface for both MM and GX fonts.
Post by Chris Liddell
I'd like to add the ability to set/get the weight vector directly
(FT_Set/Get_MM_Weight_Vector), [...]
This is OK.
Post by Chris Liddell
If no one knows, or there was no such reason, then I'll put a patch
together.
Thanks for working on this!


Werner
Chris Liddell
2018-11-23 14:49:10 UTC
Permalink
Post by Werner LEMBERG
Post by Chris Liddell
I'm guessing setting the weight vector directly isn't included
because it wasn't originally part of Adobe's MM usage.
Maybe. Another reason was probably the goal to have a uniform
interface for both MM and GX fonts.
Post by Chris Liddell
I'd like to add the ability to set/get the weight vector directly
(FT_Set/Get_MM_Weight_Vector), [...]
This is OK.
Post by Chris Liddell
If no one knows, or there was no such reason, then I'll put a patch
together.
Thanks for working on this!
I've taken a first pass at this:

https://tinyurl.com/yatcd4xn

I'm sure I've messed up some coding standard, or API detail things, so
let me know if anyone has issues with it.

Chris
Werner LEMBERG
2018-11-23 16:44:51 UTC
Permalink
Post by Chris Liddell
Post by Chris Liddell
I'd like to add the ability to set/get the weight vector directly
(FT_Set/Get_MM_Weight_Vector), [...]
https://tinyurl.com/yatcd4xn
I'm sure I've messed up some coding standard, or API detail things,
so let me know if anyone has issues with it.
Sorry for not responding earlier; I'll look at it in the next few
days.


Werner
Chris Liddell
2018-11-24 11:11:32 UTC
Permalink
Post by Werner LEMBERG
Post by Chris Liddell
Post by Chris Liddell
I'd like to add the ability to set/get the weight vector directly
(FT_Set/Get_MM_Weight_Vector), [...]
https://tinyurl.com/yatcd4xn
I'm sure I've messed up some coding standard, or API detail things,
so let me know if anyone has issues with it.
Sorry for not responding earlier; I'll look at it in the next few
days.
Not a problem, I just assumed you were busy.

Chris
Werner LEMBERG
2018-11-26 05:33:40 UTC
Permalink
Post by Chris Liddell
Post by Chris Liddell
I'd like to add the ability to set/get the weight vector directly
(FT_Set/Get_MM_Weight_Vector), [...]
https://tinyurl.com/yatcd4xn
I'm sure I've messed up some coding standard, or API detail things,
so let me know if anyone has issues with it.
Coding is fine, thanks :-) While checking it in more detail I'll fix
whitespace issues here and there (e.g., the indentation level is
always two spaces, not four), but IMHO this is nothing you should
worry about.

Some observations:

. I'm missing a diff for the API entry in `ftmm.h'. Is this
intentional or an omission?

. You are talking about -1 as a return value of
`FT_Set_MM_WeightVector_Func'. I don't see this in the code.
Additionally, the return type is `FT_Error' so it's not clear to me
what you mean with `return value'.

. The special handling of `*len' in `T1_Get_MM_WeightVector' needs
documentation, i.e., at least a comment.


Werner
Chris Liddell
2018-11-26 09:07:04 UTC
Permalink
Post by Werner LEMBERG
Post by Chris Liddell
Post by Chris Liddell
I'd like to add the ability to set/get the weight vector directly
(FT_Set/Get_MM_Weight_Vector), [...]
https://tinyurl.com/yatcd4xn
I'm sure I've messed up some coding standard, or API detail things,
so let me know if anyone has issues with it.
Coding is fine, thanks :-) While checking it in more detail I'll fix
whitespace issues here and there (e.g., the indentation level is
always two spaces, not four), but IMHO this is nothing you should
worry about.
. I'm missing a diff for the API entry in `ftmm.h'. Is this
intentional or an omission?
An omission: diff/patch mistake porting from the freetype in gs to the
current master branch.
Post by Werner LEMBERG
. You are talking about -1 as a return value of
`FT_Set_MM_WeightVector_Func'. I don't see this in the code.
Additionally, the return type is `FT_Error' so it's not clear to me
what you mean with `return value'.
Leftover from earlier iteration of the patch, sorry.
Post by Werner LEMBERG
. The special handling of `*len' in `T1_Get_MM_WeightVector' needs
documentation, i.e., at least a comment.
See the missing ftmm.h changes!

Revised (I fixed some/all(?) of the 2/4 space indent confusions):

https://tinyurl.com/ydyx2sjs

Cheers,

Chris
Werner LEMBERG
2018-11-27 21:25:53 UTC
Permalink
Post by Chris Liddell
https://tinyurl.com/ydyx2sjs
Massaged and applied to git, thanks!


Werner
Chris Liddell
2018-11-28 09:28:07 UTC
Permalink
Post by Werner LEMBERG
Post by Chris Liddell
https://tinyurl.com/ydyx2sjs
Massaged and applied to git, thanks!
Thanks Werner, much appreciated.

Chris

Loading...