summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-09 00:22:21 +0000
committerKarl Berry <karl@freefriends.org>2010-06-09 00:22:21 +0000
commite75495f92d91038a568dec3fd1cc854d51daf4c7 (patch)
tree99417371e2a2c104d8082b24e8f1a0faef2be81e /Master/texmf-dist/tex/latex/fontspec/fontspec.lua
parentaac86e6df7bc5de903798b0c8a7f6b49cf4e9b75 (diff)
fontspec v2 (8jun10)
git-svn-id: svn://tug.org/texlive/trunk@18825 c570f23f-e606-0410-a88d-b1316a301751
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