Mohamed Elrashid
Mohamed Elrashid

Reputation: 8599

Angular 2 typescript Unicode(Arabic) text support

I having trouble while using typescript and Angular 2 it was working fine like this :

but when adding Unicode text "arabic" i'm getting this

The html file is fine stand-alone but after compinge

My TypeScript config file tsconfig.json

            {
              "compilerOptions": {
                "module": "commonjs",
                "target": "es5",
                "sourceMap": false,
                "emitDecoratorMetadata": true,
                "experimentalDecorators": true,
                "noLib": false
              },
              "exclude": [
                  "node_modules"
              ]
            }

-- Help , Any idea : I tried google and the Anglular docs !

Upvotes: 3

Views: 2275

Answers (2)

c.medjelled
c.medjelled

Reputation: 1

jspdf not supported arabic characters in angular2. I use jspdf in angular2 and try to insert arabic characters,i add a font but don't work

doc.addFont('NafeesNastaleeq.ttf', 'arabic', 'normal', 'Identity-H');
doc.setFont('arabic');
doc.text(50, 50, 'السلام عليكم'  );

Upvotes: 0

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657148

This looks like an Angular issue.

See also - https://github.com/angular/angular/issues/6036

There seems to be a pull request for a similar case. Not sure if this fixes your issue as well.

Upvotes: 1

Related Questions