Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Setting zero width space as bullet character for paragraphStyle

People's Champ ,
Nov 29, 2011 Nov 29, 2011

Hello,

Maybe this one could go on in the general InDesign forum but as I am trying to achieve this by script, I thought I could get valuable inputs from you guys.

Do you think it's possible to set a zero width space as a bullet character for a paragraph style ?

If I try this to get character code, its failing :

app.selection[0].characters[0].contents .charCodeAt (0); //Error

Given that first and unique character is a zero width space. It works fine with a regular character. So it seems that as it is a special character, it doesn't have any code (except from enumeration) ?

I noticed unicode for zero width space is U+200B but I can't get to pass it as a value for the bulletChar.characterValue property.

Am I stuck in a deadend ?

best,

loic

TOPICS
Scripting
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Nov 29, 2011 Nov 29, 2011

I don't think the bullet characters will show up in the contents unless you convert them to text first.

It looks like these will work to supply a unicode ID number for the character you want:

paragraphStyle.bulletChar.characterValue = 0x200B;

or

paragraphStyle.bulletChar.characterValue = 8203;

Jeff

Translate
Engaged ,
Nov 29, 2011 Nov 29, 2011

Hi Loic,

characterValue property accept the Glyph ID values too... try the approach.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Nov 29, 2011 Nov 29, 2011
LATEST

Hi all and thank you for inputs,

@imagine > yes but zero width character seems to have the regular space glyph code. So problem is that in this case, I will end up with a regular space creating an indent in the beginning of the line. Unless I am wrong.

@absqua > Great !!! It works fine. I tried to set unicode value but the wrong way.

Thanks you again for all of you.

Loic

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 29, 2011 Nov 29, 2011

I don't think the bullet characters will show up in the contents unless you convert them to text first.

It looks like these will work to supply a unicode ID number for the character you want:

paragraphStyle.bulletChar.characterValue = 0x200B;

or

paragraphStyle.bulletChar.characterValue = 8203;

Jeff

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines