Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word breaks when using non-English fonts

Status
Not open for further replies.

mohaimen

Programmer
Dec 24, 2001
25
0
0
BD
Hi,

I am using Crystal Reports 10 in producing some reports in Bangla language fonts. The font I am using uses special characters like hiphens (-) as ordinary characters. When a word with such a character is found at the end of line and there is not enough space in the line to accomodate it, the word breaks and part of the word goes to next line.

Can anyone help me solve the problem?

Best regards.

Mohaimen
 
You could use an underscore, which will keep_together, keep_together, keep_together, keep_together, keep_together, whereas a hyphen will break-apart, break-apart, break-apart, break-apart. (At least it does here; translation onto the web can be tricky and can vary between viewers.)

In MS Word, there is such a thing as a non-breaking hyphen, and even a non-breaking space. (Insert>Symbol>Special Character). But I don't know of any equivalent in Crystal.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
I would suggest something like putting in your display string a formula like this:

replace(currentfieldvalue,"-",chrw(2011))

Where 2011 would be the unicode value of the non-breaking hyphen, if my references are correct. You would maybe need to get the right unicode value for the hyphen it thinks it is seeing (could be a minus, could be a soft hyphen).

Sadly I was unable to test this on my machine since I don't have any fonts loaded that would behave as you describe. So you may have to do some more searching if that doesn't work.

I'd seriously consider going to the font author and seeing if they have a solution. I understand a non-breaking hyphen is actually dependent on the font supporting it.

Best of luck.

Scottm.

 
Hi,

Thanks for the replies.

My problem is, I am using a font that treats hyphen as an ordinary character of Bangla language and the word containing the character should not break. For example, if a font treats hyphen as character 's', then any word containing 's' should not break on 's'. So, replacing hyphen with other character will not work as it will change the word. Is there any way to tell Crystal Reports that hyphen is not a word separator. I used VFP and Data Dynamics Active Report in producing reports in Bangla and they did not have any problem.

Any clue?

Regards.

Mohaimen
 
Mohaimen,

Did you actually try any of the replace suggestions?

Replace({Insert_Your_Field_Here},'-',chr(45))

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top