diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-07-26 19:37:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-07-26 19:37:00 +0200 |
commit | 07f9052e9f88459a4ee947f6c01d9de1119b8355 (patch) | |
tree | bab894ba034423f33358488de889e64e83220979 /tex/context/base/font-ctx.lua | |
parent | 860c6eaca8251c559f0486c0c1acf7f161821d82 (diff) | |
download | context-07f9052e9f88459a4ee947f6c01d9de1119b8355.tar.gz |
beta 2012.07.26 19:37
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index a7dcd6edd..8fdb42c7d 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -790,6 +790,18 @@ local scale_scaled = P("scaled") * Cc(4) * spaces * dimension -- value local sizepattern = spaces * (scale_at + scale_sa + scale_mo + scale_scaled + scale_none) local splitpattern = spaces * value * spaces * rest +function helpers.splitfontpattern(str) + local name, size = lpegmatch(splitpattern,str) + local kind, size = lpegmatch(sizepattern,size) + return name, kind, size +end + +function helpers.fontpatternhassize(str) + local name, size = lpegmatch(splitpattern,str) + local kind, size = lpegmatch(sizepattern,size) + return size or false +end + local specification -- still needed as local ? local getspecification = definers.getspecification |