Author |
Topic |
|
aiz
New Member
5 Posts |
Posted - May 03 2005 : 05:32:48 AM
|
"Highlight matching {} and ()" works properly on my computer for Courier (New) font only.
------ VA_X.dll file version 10.1.1301.0 Licensed to: VA X: VA.NET 7.1: VAOpsWin.dll version 1.2.0.4 DevEnv.exe version 7.10.3077.0 msenv.dll version 7.10.3077.0 Font: Lucida Console 20(Pixels) Comctl32.dll version 5.81.4916.400 WindowsNT 5.0 Build 2195 Service Pack 4 2 processors -----
I use VS.NET 2003.
With all proportional fonts I've tried and with fixed Lucida Console font "Highlight matching {} and ()" does not work in lines containing C++ keywords (if, while, for and static_cast for sure). But it works as expected with Courier New font.
For example,
if (IS(pComp, CCorSymbolComponent) ||
IS(pComp, CCorLinkComponent))
there is no highlighting of any () when caret is in first line and only () in second line can be highlighted when caret is in second line. When caret is in first column of second line only last closing parenthesis in second line is highlighted and first opening parenthesis in first line isn't.
It's my second attempt to evaluate VA. First was a couple of years ago and VA was unable to parse properly and then coloring classes and methods of some of third-party libraries. Current version do it well and it's a great news for me. But problem with bracket highlighting can be a showstopper because I prefer to use "more visible" for my eyes fonts in VS (Verdana or Lucida Console) and Courier is not good for me ;-(
|
Cheers, Alexander |
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - May 03 2005 : 05:35:21 AM
|
Hmm, strange... it does work for me using "Bitstream Vera Sans Mono" (don't like Courier New, too). I'll try your font this afternoon. I'll post my results here...
|
|
|
|
aiz
New Member
5 Posts |
Posted - May 03 2005 : 05:54:52 AM
|
Works for me too using "Bitstream Vera Sans Mono", thanks for new good enough fixed font (Lucida seems better for me still and Verdana is my best). But does not work with proportional "Bitstream Vera Sans". Does VAX support proportional fonts at all? How can braces highlighting depends on fonts?
|
Cheers, Alexander |
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - May 03 2005 : 07:28:56 AM
|
Bracket colouring doesn't work in proportional fonts if there is tab-Code-tab-CodeWithBrackets on a line. I reported this nearly two years ago (652) and again seven months ago (2905) but it still hasn't been fixed. Could this be what you are seeing?
Bracket colouring is also broken if you scroll the edit window horizontally (1953), but it doesn't sound like that's what you're seeing here.
And to answer your last question: fonts matter because VAX needs to know where on the line the brackets appear so that it can paint over them. |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - May 03 2005 : 07:55:21 AM
|
@Stephen: I'll tell the Devs to look into those issues again. |
|
|
|
aiz
New Member
5 Posts |
Posted - May 03 2005 : 08:23:04 AM
|
2 Stephen: Your pattern works on my computer for Verdana font:
if (IS(pComp, CCorSymbolComponent) ||
IS(pComp, CCorLinkComponent))
All brackets are highlighted properly in both lines! It's tab-'if'-tab-'(...) ||' pattern. But it works for 'if' keyword only, not for 'for', 'while' or 'do'. It seems also that horizontal scrolling does not affect highlighting for me.
Thanks for the answer. It seems that VAX calculates screen cooordinates of bracket char and draw it itself in bold? So VS does not provide API for font manipulation in Editor? Bad thing.
Then what is so bad with my Verdana and Lucida Console? I'm under Win2k Sp4. Maybe WinXP has better/fixed fonts and bracket highlighting works under it?
|
Cheers, Alexander |
|
|
aiz
New Member
5 Posts |
Posted - May 03 2005 : 08:37:26 AM
|
It seems that I found the source of my problem: I use bold font for keywords. If I unckeck bold then brackets highlighting works properly with both Verdana and Lucida Console. But I so got accustomed to bold keywords... :)
WT, can you fix it, please?
|
Cheers, Alexander |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - May 03 2005 : 3:49:15 PM
|
*sigh* using .NET 2003, VA 1301 and C++ i was able to reproduce this by changing my font from "Bitstream Vera Sans Mono" to "Lucida Console"
toggling VA's "Local symbols in Bold" option caused brackets to show in bold or not show in bold.
then i closed the C++ project i was using and opened a C# project instead. suddenly brackets were always shown bold. so i swapped back to C++ again and now brackets are always shown in bold. i have tried toggling the VA option "Local symbols in Bold" to no effect in the following fonts:
Bitstream Vera Sans Mono Georgia Lucida Console Verdana
if i can make this happen on demand i will put in a case. when it is random it is very hard to tell if it has been fixed *sigh* |
zen is the art of being at one with the two'ness |
|
|
aiz
New Member
5 Posts |
Posted - May 10 2005 : 07:21:38 AM
|
I use bold font for keywords and this setting is VS, not VAX.
Here are some more details I found:
I get broken brackets highlighting in C++, C# and VB if keywords is bold and line of code contains any keyword. More over it seems that if the font has bold letters of the same width as normal letters then highlighting works for bold keywords. I know about at least two such fonts: Courier and Bitstream Vera Sans Mono. For all fonts without this property (including all proportional ones I think) boldness of something in a line of code breaks brackets highlighting.
Could it helps developers to fix the bug? |
Cheers, Alexander |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - May 12 2005 : 3:19:04 PM
|
*ah* i did not realise you were using that bold option. using that i can reproduce this effect in several fonts, including Courier. the work around for now is to disable bold on keywords, rather obviously
case=611 |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|