aligrudi / neatvi

A small vi/ex editor for editing UTF-8 text
http://litcave.rudi.ir/
305 stars 25 forks source link

Diacritics rendering support #79

Open avidseeker opened 6 months ago

avidseeker commented 6 months ago

Example text:

السَّلامُ عَليْكُم

Diacritics are rendered as ـــ

aligrudi commented 6 months ago

avidseeker @.***> wrote:

Example text:

السَّلامُ عَليْكُم

Diacritics are rendered as ـــ

The placeholders array of conf.h specify how to render diacritics.

static struct placeholder {
    char *s;    /* the source character */
    char *d;    /* the placeholder */
    int wid;    /* the width of the placeholder */
} placeholders[] = {

When rendering, every occurrence of s is replaced with d; the width of d must be wid screen columns. You can change that for Arabic diacritics.

But first please make sure that your terminal can render diacritics.

Ali