From 553d545a5570fbac9c7d4432f41f99696ddb4024 Mon Sep 17 00:00:00 2001
From: Andrey Ruzhanskiy <andrey.ruzhanskiy@tu-dresden.de>
Date: Wed, 4 Sep 2019 14:00:40 +0200
Subject: [PATCH] Adjusted the table

---
 .../de/tudresden/inf/mci/brailleplot/App.java   | 17 +++++++++++++++++
 .../resources/mapping/kurzschrift_DE.properties |  9 ++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/App.java b/src/main/java/de/tudresden/inf/mci/brailleplot/App.java
index 279e78a7..27887867 100644
--- a/src/main/java/de/tudresden/inf/mci/brailleplot/App.java
+++ b/src/main/java/de/tudresden/inf/mci/brailleplot/App.java
@@ -6,6 +6,7 @@ import de.tudresden.inf.mci.brailleplot.configparser.Printer;
 
 import de.tudresden.inf.mci.brailleplot.layout.PlotCanvas;
 import de.tudresden.inf.mci.brailleplot.layout.RasterCanvas;
+import de.tudresden.inf.mci.brailleplot.layout.Rectangle;
 import de.tudresden.inf.mci.brailleplot.point.Point2DValued;
 import de.tudresden.inf.mci.brailleplot.printabledata.FloatingPointData;
 import de.tudresden.inf.mci.brailleplot.printerbackend.PrintDirector;
@@ -24,6 +25,9 @@ import de.tudresden.inf.mci.brailleplot.csvparser.CsvType;
 import de.tudresden.inf.mci.brailleplot.datacontainers.CategoricalPointListContainer;
 import de.tudresden.inf.mci.brailleplot.datacontainers.PointList;
 import de.tudresden.inf.mci.brailleplot.diagrams.BarChart;
+import de.tudresden.inf.mci.brailleplot.rendering.BrailleText;
+import de.tudresden.inf.mci.brailleplot.rendering.FunctionalRasterizer;
+import de.tudresden.inf.mci.brailleplot.rendering.LiblouisBrailleTextRasterizer;
 import de.tudresden.inf.mci.brailleplot.rendering.MasterRenderer;
 import de.tudresden.inf.mci.brailleplot.svgexporter.BoolFloatingPointDataSvgExporter;
 import de.tudresden.inf.mci.brailleplot.svgexporter.BoolMatrixDataSvgExporter;
@@ -206,6 +210,19 @@ public final class App {
             SvgExporter<PlotCanvas> floatSvgExporter = new BoolFloatingPointDataSvgExporter(floatCanvas);
             floatSvgExporter.render();
             floatSvgExporter.dump("floatingPointData");
+            LiblouisBrailleTextRasterizer textRasterizer = new LiblouisBrailleTextRasterizer(indexV4Printer);
+            renderer.getRenderingBase().registerRasterizer(new FunctionalRasterizer<BrailleText>(BrailleText.class, textRasterizer));
+            RasterCanvas refCanvas = renderer.rasterize(new BrailleText(" ", new Rectangle(0, 0, 0, 0)));
+
+            String text = "()[]üÄß@`";
+            int xpos = 0;
+            int ypos = 0;
+            int maxWidth = 20 * 2;
+            int height = textRasterizer.calculateRequiredHeight(text, xpos, ypos, maxWidth, refCanvas);
+            Rectangle textArea = new Rectangle(xpos, ypos, maxWidth, height);
+            RasterCanvas mcanvas = renderer.rasterize(new BrailleText(text, textArea));
+
+
 
             // Check if some SpoolerService/Printservice exists
             if (!PrintDirector.isPrintServiceOn()) {
diff --git a/src/main/resources/mapping/kurzschrift_DE.properties b/src/main/resources/mapping/kurzschrift_DE.properties
index e2722481..c7345e74 100644
--- a/src/main/resources/mapping/kurzschrift_DE.properties
+++ b/src/main/resources/mapping/kurzschrift_DE.properties
@@ -7,7 +7,7 @@
 # This table contains a mapping from letters to a 6*n-bit-string, representing the braillecell.
 # It's used by the BrailleTextRasterizer.
 # All the chars which need more than one braillecell are already taken into consideration in the
-# kurzschrift table.
+# kurzschrift table. Mostly taken form the de-chardefs6.cti.
 # =============================================================================
 
 #Special characters
@@ -24,6 +24,7 @@
 '=000001
 # = character
 )=011011
+(=011011
 \u0023=001111
 
 +=011010
@@ -36,6 +37,12 @@
 <=000011
 _=000111
 ^=110111
+\==011110
+$=000101
+|=001100
+{=111011
+}=011111
+`=001110
 
 
 # Numbers
-- 
GitLab