Skip to content
This repository has been archived by the owner. It is now read-only.

New auxiliary functions to be called by other packages #24

Closed
eroux opened this issue Apr 30, 2013 · 6 comments
Closed

New auxiliary functions to be called by other packages #24

eroux opened this issue Apr 30, 2013 · 6 comments
Assignees

Comments

@eroux
Copy link
Member

@eroux eroux commented Apr 30, 2013

It would be very useful to have auxiliary functions that could be called by other packages. This would be like a "font API", and would prevent updates in luaotfload to break everything in other packages. The useful functions would be:

the functions you can find in fontspec.lua (https://github.com/eroux/fontspec/blob/master/fontspec.dtx#L6668), with quite explicit names:

  • check_script(font_id, script)
  • check_language(font_id, language, script)
  • check_feature(font_id, feature, language, script)
  • set_capheight(fontdata)
  • get_mathfontdimen(fontdata, dimen)

the function in unicode-math.lua (https://github.com/eroux/unicode-math/blob/master/unicode-math.dtx#L1453)

  • set_sscale_dimens(fontdata)
  • patch_cambria_domh(fontdata)

the function in polyglossia : (https://github.com/eroux/polyglossia/blob/master/lua/polyglossia.lua#L40)

  • check_char (font_id, char) returning a boolean if char is present in the font with id font_id

maybe other functions from ConTeXt (from the .lfg files in the fonts/ directory)?

@ghost ghost assigned phi-gamma Apr 30, 2013
@phi-gamma
Copy link
Member

@phi-gamma phi-gamma commented Apr 30, 2013

Interestingly, commenting on this issue I just closed, Khaled says that the set_sscale_dimens related stuff was moved from luaotfload, which contained it initially, to unicode-math, its only user. So for the moment I’d assume that whoever needs it will load unicode-math anyways.

The patch_cambria_domh is too specific to a single font and math, also we already keep the code around in tests/font_patch.tex. Maybe it had been migrated from luaotfload as well? Idk the package history well enough.

@eroux
Copy link
Member Author

@eroux eroux commented May 1, 2013

This might have been consistant at a certain time and might be again in the future, but in the situation we are in right now, I think it's definitely better to get them back (maybe not cambria? not sure) in luaotfload. The reason is that Will is not responding and we have no control on unicode-math nor fontspec, so we cannot update luaotfload... If fontspec and unicode-math were depending only on an API of luaotfload and not on the internal structure of otfl-merged.lua, we could make new releases of luaotfload, independant from an update of fontspec or unicode-math... When we'll reach 1.0 version, then code could go outside, but I'm not 100% sure it's relevant either... What do you think?

@eroux
Copy link
Member Author

@eroux eroux commented May 1, 2013

We should also include

name_to_slot(font_id, name)

from microtype.lua; it will be less maintainance from Robert, I think he'll be happy with that!

@phi-gamma
Copy link
Member

@phi-gamma phi-gamma commented May 1, 2013

see here #30

eroux added a commit that referenced this issue May 3, 2013
@phi-gamma
Copy link
Member

@phi-gamma phi-gamma commented May 4, 2013

Can we close this?

@eroux
Copy link
Member Author

@eroux eroux commented May 4, 2013

Affirmative!

@eroux eroux closed this May 4, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants