Forum > SynEdit

[SOLVED] Synedit shows ⋅ as a quadrangle

(1/1)

CM630:
When I execute the following code SynEdit displays the dot as a quadrangle.
TEdit, on the other hand, displays it as it should.
Both controls have the font CourierNew. Can I do something to have the ⋅ character displayed?


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  Edit1.Text := '2⋅0,95 = 1,9';  SynEdit1.Text := '2⋅0,95 = 1,9';

That happens on Win 10 64 bit with Lazarus 3.0.

rvk:
It's not the Font. It's probably the encoding.

What Unicode character is that?
Alt+250 dot seems to be fine.

CM630:

--- Quote from: rvk on February 19, 2024, 08:32:48 am ---It's not the Font. It's probably the encoding.

What Unicode character is that?
Alt+250 dot seems to be fine.

--- End quote ---
I have no idea what is “Alt+250”.
Maybe the image will answer the question about the Unicode character.

rvk:
Alt+250 is Unicode character "middle dot"/
https://www.fileformat.info/info/unicode/char/b7/index.htm

You can get it by holding the Alt key and pressing 2 5 0 on your numeric keyboard.
It looks the same as your "Dot operator" character (which seems to be char($22C5)).

I can't even copy and paste that character in my code editor of Lazarus (in the source).
Even copying it in Notepad++ (in UTF8 mode) doesn't work.

Does loading it from a file work?
(then it might be a conversion problem from source-code to program-code.)

Edit: O, it just occured to me.... That character might not even be in the Courier New font.
Did you try another font??

Note: TEdit/Windows substitutes fonts automatically when characters are not supported.
In this case Windows substitutes it for "Cambria Math".

Edit #2: Yes... this works fine:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  SynEdit1.Font.Name := 'Cambria Math';  Edit1.Text := '2' + #$E2#$8B#$85 + '0,95 = 1,9';  SynEdit1.Text := Edit1.Text;(although Cambria Math doesn't look good in SynEdit but that's another matter...)

CM630:

--- Quote from: rvk on February 19, 2024, 09:09:05 am ---
Alt+250 is Unicode character "middle dot"/
https://www.fileformat.info/info/unicode/char/b7/index.htm

You can get it by holding the Alt key and pressing 2 5 0 on your numeric keyboard.

--- End quote ---

Thanks, it shows fine.



--- Quote from: rvk on February 19, 2024, 09:09:05 am ---
It looks the same as your "Dot operator" character (which seems to be char($22C5)).

--- End quote ---

Indeed, I will use that char instead.



--- Quote from: rvk on February 19, 2024, 09:09:05 am ---
I can't even copy and paste that character in my code editor of Lazarus (in the source).

--- End quote ---

I can neither.


--- Quote from: rvk on February 19, 2024, 09:09:05 am ---
Does loading it from a file work?

--- End quote ---
No, I have it in the keyboard layout, so I just type it.


--- Quote from: rvk on February 19, 2024, 09:09:05 am ---
Edit: O, it just occured to me.... That character might not even be in the Courier New font.
Did you try another font??

Note: TEdit/Windows substitutes fonts automatically when characters are not supported.
In this case Windows substitutes it for "Cambria Math".

--- End quote ---
That sounds like a perfectly reasonable explanation. So I will use the other dot ·

Thanks!


Edit: The dot char seems to be #8901.

Navigation

[0] Message Index

Go to full version