summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/fontspec/fontspec.lua')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua30
1 files changed, 5 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index c67d56c2702..b777424cfeb 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -13,6 +13,8 @@
-- License information appended.
--
--
+
+
fontspec = { }
fontspec.module = {
@@ -142,38 +144,16 @@ function fontspec.check_ot_feat(fnt, feat, lang, script)
end
end
-
-function fontspec.get_dimen(fontdimen, csname)
- local id, h, em, pt
- if csname == "font" then
- id = font.current()
- else
- id = font_id(csname)
- end
- if fontdimen == 8 then
- h = fonts.ids[id].shared.otfdata.pfminfo.os2_capheight
- elseif fontdimen == 5 then
- h = fonts.ids[id].shared.otfdata.pfminfo.os2_xheight
- end
- em = fonts.ids[id].shared.otfdata.metadata.units_per_em
- pt = fonts.ids[id].size / 65536
- tex.sprint(string.format("%spt", (h/em)*pt))
-end
-
-function fontspec.charglyph(char, csname)
- local id, c
+function fontspec.charglyph(char)
if char then
+ local id, c
if utf.len(char) > 1 then
c = utf.byte(utf.char(char:gsub('"', '0x')))
else
c = utf.byte(char)
end
- if csname then
- id = font_id(csname)
- else
- id = font.current()
- end
+ id = font.current()
if font.fonts[id]["characters"][c] then
return font.fonts[id]["characters"][c].index