From e829a47bf78db8f1a9f691dcd7b096eab58040ad Mon Sep 17 00:00:00 2001
From: Khaled Hosny <khaledhosny@eglug.org>
Date: Fri, 2 Apr 2010 07:29:34 +0200
Subject: Fix optical size matching

With the previous commit, if we don't found a font with the requested
optical size, we return nothing, though we might have a matching font
name.

Now we store all matching names with no matching optical size and return
the first one, then we return the closest match (i.e. if the requested
size is 15pt and we have 10pt and 5pt match, we return the 10pt one).
---
 tests/opticalsize.tex | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'tests/opticalsize.tex')

diff --git a/tests/opticalsize.tex b/tests/opticalsize.tex
index d19bb59..53b1bb8 100644
--- a/tests/opticalsize.tex
+++ b/tests/opticalsize.tex
@@ -3,7 +3,11 @@
 \font\testa={Latin Modern Roman/S=12} at 10pt
 \font\testb={Latin Modern Roman}      at 5pt
 \font\testc={Latin Modern Roman}      at 10pt
+\font\testd={Latin Modern Roman/S=15} at 10pt
+\font\teste={Latin Modern Roman/S=3}  at 10pt
 \testa abcd ABCD \par
 \testb abcd ABCD \par
 \testc abcd ABCD \par
+\testd abcd ABCD \par
+\teste abcd ABCD \par
 \bye
-- 
cgit v1.2.3

