Page 1 of 2

Text alignment for [heb] tag

Posted: Mon Sep 30, 2013 8:46 am
by Jason Hare
Just wanted to suggest that you add dir="rtl" to the heb tag. This would help it with placement of geresh and punctuation at the end of lines or words.

Would it be possible with the phpBB software?

Thanks!

Re: Text alignment for [heb] tag

Posted: Mon Sep 30, 2013 8:56 am
by Kirk Lowery
Jason,

We can do any html. Is "dir-rtl" an attribute for the <span> tag?

Re: Text alignment for [heb] tag

Posted: Mon Sep 30, 2013 9:08 am
by Jason Hare
Kirk Lowery wrote:Jason,

We can do any html. Is "dir-rtl" an attribute for the <span> tag?
Yes. "dir" is an attribute that can be added to any regular HTML tag.

Code: Select all

<span style="font-family: SBL BibLit, SBL Hebrew, Times New Roman; font-size: 12pt;" dir="rtl">
There is also a style (CSS) tag that can be added for bidirectionality.

Code: Select all

style="direction: rtl; unicode-bidi: embed;"
This can be added if you're using CSS.

Thanks!

Re: Text alignment for [heb] tag

Posted: Mon Sep 30, 2013 10:40 am
by Kirk Lowery
I've added the attribute to the tag. Jason, could you please check (or even post test cases here), to verify it's working as you'd expect?

Thanks!

Re: Text alignment for [heb] tag

Posted: Mon Sep 30, 2013 11:31 am
by Jason Hare
בודק את הקוד. תודה רבה!

It works perfectly. Thanks a lot. :)

Re: Text alignment for [heb] tag

Posted: Mon Sep 30, 2013 5:18 pm
by Kirk Lowery
Jason Hare wrote:This would help it with placement of geresh and punctuation at the end of lines or words.
Jason,

Have you checked geresh and other punctuation with cantillated text? Does it meet your expectations?

Re: Text alignment for [heb] tag

Posted: Mon Sep 30, 2013 9:55 pm
by Jason Hare
Kirk Lowery wrote:
Jason Hare wrote:This would help it with placement of geresh and punctuation at the end of lines or words.
Jason,

Have you checked geresh and other punctuation with cantillated text? Does it meet your expectations?
All cantillation works according to the settings of the font, not the layout of the code. Because it's coded to SBL Hebrew, it works according to the font specifications.

Here's a check:

אַ֥שְֽׁרֵי הָאִ֗ישׁ אֲשֶׁ֤ר ׀ לֹ֥א הָלַךְ֮ בַּֽעֲצַ֪ת רְשָׁ֫עִ֥ים
וּבְדֶ֣רֶךְ חַ֭טָּאִים לֹ֥א עָמָ֑ד וּבְמוֹשַׁ֥ב לֵ֝צִ֗ים לֹ֣א יָשָֽׁב׃


Even alignment wouldn't be affected here, since the sof-pasuk is encoded automatically for right-to-left, unlike periods and commas, which are common to the English keyboard.

The issue in the example that I just posted is line-height, which isn't wide enough to allow for the points and cantillation. Can you see the issue on your side?

Re: Text alignment for [heb] tag

Posted: Tue Oct 01, 2013 8:42 am
by Kirk Lowery
I see two problems here: the line spacing as you mentioned, and the text is not right-aligned.

Is there an html attribute for line spacing, ideally something we can increase by something more granular than "line and a half; double spaced", in picas or inches, mm or something?

As for the alignment problem, I thought I had tested this. There are two conditions to deal with: (1) inline Hebrew text surrounded by Latin text; (2) a paragraph of Hebrew only. I wonder if the dir attribute is confusing the UTF-8 bidi algorithm...

I'll do more research on this.

Re: Text alignment for [heb] tag

Posted: Tue Oct 01, 2013 8:48 am
by Kirk Lowery
I've resolved (at least for my display) the line spacing issue. Jason, check it out: your text should now have sufficient space. The attribute is line-height and I've set it to 130%.

Re: Text alignment for [heb] tag

Posted: Tue Oct 01, 2013 4:35 pm
by Jason Hare
Kirk Lowery wrote:I see two problems here: the line spacing as you mentioned, and the text is not right-aligned.

Is there an html attribute for line spacing, ideally something we can increase by something more granular than "line and a half; double spaced", in picas or inches, mm or something?

As for the alignment problem, I thought I had tested this. There are two conditions to deal with: (1) inline Hebrew text surrounded by Latin text; (2) a paragraph of Hebrew only. I wonder if the dir attribute is confusing the UTF-8 bidi algorithm...

I'll do more research on this.
The line-height is now fine. Thanks.

If you want a paragraph aligned on the right, you need to add / dir="rtl" / to an entire <p> tag or <div> tag - not to a <span> tag, which doesn't govern an entire chunk of text in the same sense.

On my forum, I created the tags / he / for Hebrew text within English text and / hep / (that is, "Hebrew Paragraph") for text that needs to be aligned on the right.

The way your forum is currently set up, you could just use the right-alignment tag to align it on the right:
אַ֥שְֽׁרֵי הָאִ֗ישׁ אֲשֶׁ֤ר ׀ לֹ֥א הָלַךְ֮ בַּֽעֲצַ֪ת רְשָׁ֫עִ֥ים
וּבְדֶ֣רֶךְ חַ֭טָּאִים לֹ֥א עָמָ֑ד וּבְמוֹשַׁ֥ב לֵ֝צִ֗ים לֹ֣א יָשָֽׁב׃
That is:

Code: Select all

[right][heb]אַ֥שְֽׁרֵי הָאִ֗ישׁ אֲשֶׁ֤ר ׀ לֹ֥א הָלַךְ֮ בַּֽעֲצַ֪ת רְשָׁ֫עִ֥ים
וּבְדֶ֣רֶךְ חַ֭טָּאִים לֹ֥א עָמָ֑ד וּבְמוֹשַׁ֥ב לֵ֝צִ֗ים לֹ֣א יָשָֽׁב׃[/heb][/right]
Hope this helps.

Jason