From 5432168694874ef02b374d4f25783578e8b95f62 Mon Sep 17 00:00:00 2001 From: amontano Date: Sat, 23 Nov 2002 21:03:33 +0000 Subject: [PATCH] Fixed bug that recently appeared that made it crash. Enabled the property thdl.rely.on.system.tmw.fonts before the production of TibetanMachineWeb HTML. This avoids --- source/org/thdl/tib/scanner/OnLineScannerFilter.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/org/thdl/tib/scanner/OnLineScannerFilter.java b/source/org/thdl/tib/scanner/OnLineScannerFilter.java index 5e87df5..0cabcb3 100644 --- a/source/org/thdl/tib/scanner/OnLineScannerFilter.java +++ b/source/org/thdl/tib/scanner/OnLineScannerFilter.java @@ -24,6 +24,7 @@ import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.thdl.tib.text.TibetanHTML; +import org.thdl.util.ThdlOptions; /** Interfase to provide access to an on-line dictionary through a form in html; Inputs Tibetan text (Roman script only) and displays the @@ -40,7 +41,6 @@ public class OnLineScannerFilter extends HttpServlet { public OnLineScannerFilter() throws Exception { - rb = ResourceBundle.getBundle("dictionary"); scanner = new LocalTibetanScanner(rb.getString("onlinescannerfilter.dict-file-name")); } @@ -49,6 +49,7 @@ public class OnLineScannerFilter extends HttpServlet { HttpServletResponse response) throws IOException, ServletException { + ThdlOptions.setUserPreference("thdl.rely.on.system.tmw.fonts", true); response.setContentType("text/html"); PrintWriter out = response.getWriter(); String parrafo = request.getParameter("parrafo"), checkboxName, script; @@ -64,8 +65,10 @@ public class OnLineScannerFilter extends HttpServlet { out.println("The Online Tibetan to English Translation/Dictionary Tool"); script = request.getParameter("script"); - // script==null || makes default tibetan - wantsTibetan = (script!=null && script.equals("tibetan")); + /* script==null || makes default tibetan + script!=null && makes default roman + */ + wantsTibetan = (script==null || script.equals("tibetan")); if (wantsTibetan) { out.println(""); @@ -92,7 +95,7 @@ public class OnLineScannerFilter extends HttpServlet { out.println(" "); out.println("

Tibetan script (CURRENTLY UNSTABLE, DO NOT USE)
"); //(using Tibetan Machine Web font)
"); + out.println("name=\"script\">Tibetan script (using Tibetan Machine Web font)
"); out.println(" Roman script");