ref: 444dd6894e6631344f65f3df51e89b154f5273e7
parent: 27c39c735ad6b88784ed7450af2ab088a4f13770
author: Ali Gholami Rudi <ali@rudi.ir>
date: Thu Aug 22 15:22:42 EDT 2013
wb: do not match single character ligatures
--- a/font.c
+++ b/font.c
@@ -58,7 +58,7 @@
}
for (i = 0; i < fn->nlig; i++) {
int l = strlen(fn->lig[i]);
- if (b[len - l] && !strcmp(s + len - l, fn->lig[i]))
+ if (b[len - l] > 1 && !strcmp(s + len - l, fn->lig[i]))
if (font_find(fn, fn->lig[i]))
return b[len - l];
}
--- a/wb.c
+++ b/wb.c
@@ -176,7 +176,7 @@
while (wb_prev(wb, ++i))
cs[i + 1] = wb_prev(wb, i);
ligpos = font_lig(dev_font(R_F(wb)), cs, i + 1);
- if (ligpos > 0) {
+ if (ligpos > 1) {
for (i = 0; i < ligpos - 1; i++)
strcat(lig, wb_prev(wb, ligpos - i - 2));
strcat(lig, c);