From 07f9052e9f88459a4ee947f6c01d9de1119b8355 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 26 Jul 2012 19:37:00 +0200 Subject: beta 2012.07.26 19:37 --- tex/context/base/font-ctx.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tex/context/base/font-ctx.lua') 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 -- cgit v1.2.3