aboutsummaryrefslogtreecommitdiffstats
path: root/mainwindow.cpp
diff options
context:
space:
mode:
authorElOraiby <wael.eloraiby@gmail.com>2015-05-31 17:44:04 -0400
committerElOraiby <wael.eloraiby@gmail.com>2015-05-31 17:44:04 -0400
commit2b81c17e2ca89df942479f51b8057ac713abe2d4 (patch)
tree3c1e482212fdb4da136650bbcd0bf3b83472fd52 /mainwindow.cpp
parentd6621fd7ef1971a4d5bc3e2dba97c83d6eff43f5 (diff)
optimized code (one pass no conditional switch)
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r--mainwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 5173fda..14a2871 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -58,7 +58,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui__->setupUi(this);
int width = 480;
- int height = 320;
+ int height = 392;
int font_size = 24;
std::ifstream ifs("arabic_test.txt");
@@ -117,7 +117,7 @@ MainWindow::MainWindow(QWidget *parent) :
{
uint ch = get_arabic_form(arabic_cp, idx);
if( ch == 0xA ) {
- line += font_size;
+ line += font_size + 5;
col = width - font_size;
continue;
}