Pptxgenjs: RTL ability for punctiation.

Created on 30 Sep 2019  ·  3Comments  ·  Source: gitbrent/PptxGenJS

Hello @gitbrent . Can you please try this code?

myHebrewString = 'מיפוי התהליך הקיים (כיצד מבוצע כיום תוך התייחסות לגורמים משתתפים, סמכות אחריות, צווארי בקבוק). אפיון ותכנון עקרוני של התהליך המוצע – הצגת עקרונות וחלופות לפתרון, זיהוי הפתרון המיטבי';
var pptx = new PptxGenJS();
var slide = pptx.addNewSlide();
slide.addText(
  myHebrewString,
  { x:0.0, y:0.25, w:'100%', h:1.5, align:'c', font_size:24, color:'0088CC', fill:'F1F1F1' }
);
slide.addText(
  myHebrewString,
  { x:0.0, y:3.25, w:'100%', h:1.5, align:'c', font_size:24, color:'0088CC', fill:'F1F1F1', rtlMode:true }
);
pptx.save('PptxGenJS-RTL-Test');

"myHebrewString" is coming from a textarea.
Looks like RTL feature does not support punctuation. Punctuation are saving their LTR situation. Any idea?

test

needs-investigation

Most helpful comment

Have you tried adding
lang='he'

Since it defaults to en-US if unspecified it may be having issues mixing RTL with an LTR language.

All 3 comments

Hi @alperendurmus

Thanks for the example.

AFAIK, rtl is merely a flag on the presentation itself, I don't actually manipulate the text in any so i'm curious as to why this would occur.

I'll investigate once i complete work on the new 3.0 version.

Have you tried adding
lang='he'

Since it defaults to en-US if unspecified it may be having issues mixing RTL with an LTR language.

Thank you!
lang='he' is working perfectly!
@gitbrent the issue does not need to be investigated anymore 👍

Was this page helpful?
0 / 5 - 0 ratings