why changing edior font in codeblocks 20.03 is showing wxWidgets debug alert? - codeblocks

I have recently installed 20.03 version of codeblocks, but when I tried to change the editor font it showed me a debug alert like this:
Two option arises there, stop and continue. If I click stop, it stops the application, and by clicking continue it keeps showing the alert message. If I restart the app it keeps showing again and again.
if anyone can help me, please do help.

I have had the same issue. After toggling a bit, I found this warning is showing when I try to change the font size and style of the editor. You can get rid of the issue by following few steps and also set the font style and size according to your choice.
Open the Codeblocks. If the warning shows, just hit the continue button for now.
Go to settings then editor from the editor.
Choose your desired font and size.
In my case, I have selected font Cambria and size 14.
Copy the font name by pressing ctrl+c.
Now press ok. Here you might get that warning again. Just click continue for now.
Close the Codeblocks.
Go to C:\Users\YOUR_USERNAME\AppData\Roaming\CodeBlocks\default.conf press ctrl+f and type 'font'. It may look something the like this:
<FONT>
<str>
<![CDATA[1;14.8;-23;0;0;0;400;0;0;0;0;3;2;1;18;Arial]]>
</str>
</FONT>
Here the second number represents the font size (14.8) and the "Arial" text is the font name. Change 14.8 according to selected font size you chose in the editor and paste the font name in place of "Arial". For me it looked like:
<FONT>
<str>
<![CDATA[1;14;-23;0;0;0;400;0;0;0;0;3;2;1;18;Cambria]]>
</str>
</FONT>
Don't forget to save it, now close it. Reopen the codeblocks and whole! there is no more warning.

I've just had the exact same problem, and using the older version of Code::Blocks resolved the issue.
Maybe something's a bit wrong with the latest version of C::B?

First of all, you have a checkbox "Don't show again in the dialog", which can be used to prevent the message box from being shown again if you press "Continue".
Second, you should report this as a bug to C::B developers, with the instructions about how to reproduce it (notably which font you chose), as it looks like an invalid font is somehow being created. It's also rather strange that they don't disable debug alerts in the production version of C::B, so you might ask them to do this too.

edit this file ..\AppData\Roaming\CodeBlocks\default.conf
ctrl+f find font
<FONT>
<str>
<![CDATA[1;14.5;-23;0;0;0;400;0;0;0;0;3;2;1;49;Consolas]]>
</str>
</FONT>
change the number 14.5 to any int or float like *.5 *.25 *.75
got this from here

After modifying the default font, there should be a something similar to:
<FONT>
<str>
<![CDATA[1;10.8;-18;0;0;0;400;0;0;0;0;10;2;1;49;FiraCode NF]]>
</str>
</FONT>
in the file C:\Users\YOUR_USERNAME\AppData\Roaming\CodeBlocks\default.conf. For some reason, replacing the second number, in this case 10.8, with an integer, e.g. 11, "solved" the issue for me (at least I don't see the warning anymore).

Related

Visual Studio 17.4 update changed font

The update for Visual Studio 17.4 has changed the font in the text editor, so that it is very thin and a bit of a strain on the eyes to the read. How can you change this back, short of rolling back the update?
Please note that I've searched a little bit for this, and I see the following setting:
But I have no idea what to set this to. People have mentioned the Consolas font on one or more other posts, but that doesn't seem to match what was there before. I've tried checking Bold. Etc.
I just need it back to the "normal Visual Studio font" that was there before the update to 17.4, which has enough thickness in the letters that it's not uncomfortable to read.
Happened to me too, and let me say that the "new" font is pretty ugly compared to the original one that was Cascadia Mono SemiBold. Also uncheck bold if was checked and the size should be to 10.
(Sadly, in my case, it is no more present in the fonts list. Maybe this is the reason why it was set back to default. But Cascadia Code SemiBold should be 99,9% similar)
In this case, you can download Cascadia Mono Releases and install it again (?) in your system.
I also had issues with the font, installing other fonts didn't help. I installed the Text Sharp addon and enabled ClearType rendering which seemed to fix the font trouble I was having.
Edit: After more investigation, Visual studio has settings for text rendering thus disabling the addon and setting the Text rendering method to ClearType gives me back the original font:
And it seems like changing the Text Formatting method to Display instead of Ideal gives me the original issue I had.
And I also had to download Cascadia Mono to get the Cascadia Code font but without the ligatures (i.e. not changing != to an = with a line through it)
Apparently there was a bug in the installer that incorrecly uninstalled the fonts during update (17.4.4 release notes)
"Addressed an issue when Cascadia Code and Cascadia Mono font gets
uninstalled during Visual Studio update process."
It is said to be fixed in 17.4.4
with the note that updating from previous version to 17.4.4 may experience the issue, but that it will not happen with future updates (e.g. 17.4.4 -> 17.4.5.)

How can I restore Chrome Customize fonts to the default?

(I'm using a MacBook Pro (16-inch, 2019) Monterey v12.5)
I was trying to test different font settings and I came up messing my "Fixed-width font".
The default is "Custom" and once I changed it to other fonts it just disappears in the drop-down list.
I figured out "Custom" font should be Courier New with bold font weight.
I have been googling to see if there is any way to restore it to the default but not quite getting the answer.
Reinstalling Chrome might be one of the methods but it takes me long time to restore other settings. I would like to know if there is other way before trying reinstall.
default fixed-width font
I just found the way to solve my own problem.
What I've done is:
"Inspect" the drop-down list option
Change the element DOM "Courier New" -> "Courier"
Select any other font once and change back to Courier (that has been just changed from "Courier")
The original font should come back.
Hope this help someone who has the same problem as mine.

How to change FileMerge's font/settings/preferences?

For some time now, I can't change FileMerge's font. Then it suddenly started using a Helvetica-like font (sans serif, variable width) for files it doesn't recognize (like typescript source files). That could be changed temporarily to monaco by changing the font to ... Helvetica. Yes, it's very weird.
But now, it shows all text white on white, and only the changed section is visible because of the different background and I cannot change it. I've tried to locate all the pref files, and reinstalled Xcode, but the text remains white on white.
Does anyone know how to change that, or where which (pref) file to change?
It could be a write permission issue, since I'm running it from a non-admin account.
Thanks.
This feature is completely broken, so you have to edit the theme file manually. It's located here:
~/Library/Developer/FileMerge/UserData/FontAndColorThemes/Default.xccolortheme
The file itself is plaintext XML. Even though it's pretty straightforward, I recommend backing it up first.
For example, if you want to increase the font size from "11.0" to "14.0", just do a find and replace.
You might be tempted to copy in a theme from Xcode. Don't bother. The font sizes don't appear to take effect, and FileMerge expects a white background, so darker themes won't work correctly.
The other answers didn't work for me (as I didn't have any theme files), but the following did:
Open FileMerge
Go to Preferences
Click the 'Set...' button under 'Font'
Click the top of the Fonts window so that it gets focus (this is the key step - if the Fonts window doesn't get focus the changes won't stick). If the Fonts window has focus, you should see your changes reflected in the FileMerge Preferences window live as you make them.
The solution was to delete the folder ~/Library/Developer/FileMerge. It did not solve the font problem (typescript files rendered with proportional font of different size, which causes problems for long files).
For me also the font panel settings have no effect at all. Same problem in XCode "Font & Colors" preferences.
For your colors problem, I would try quitting FileMerge, archiving the preference file, and relaunching:
mv ~/Library/Preferences/com.apple.FileMerge.plist ~/Library/Preferences/com.apple.FileMerge.plist.backup
FileMerge has a XCFontAndColorCurrentTheme setting:
defaults read com.apple.FileMerge XCFontAndColorCurrentTheme
I've tried setting that:
defaults write com.apple.FileMerge XCFontAndColorCurrentTheme "Presentation.xccolortheme"
But I don't see a difference. So maybe Apple is in the middle of revising this feature.
In addition to the answers already given, if those do not work, check that the files you are comparing are plain text and not rich text. If they're rich text, file merge will get the font attributes from the files themselves, hence you will not be able to affect the size of the font. You could instead open the files in a text editor and either convert them to plain text, or increase the size of the font manually.
None of this helped in my case on Big Sur, but this did the job. Requires sudo throughout so be careful.
Make a copy of a theme within the xcode bundle:
sudo cp "/Applications/Xcode.app/Contents/SharedFrameworks/DVTUserInterfaceKit.framework/Versions/A/Resources/FontAndColorThemes/Default (Light).xccolortheme" "/Applications/Xcode.app/Contents/SharedFrameworks/DVTUserInterfaceKit.framework/Versions/A/Resources/FontAndColorThemes/fileComp.xccolortheme"
Edit (in xcode for example) ~/Library/Preferences/com.apple.FileMerge.plist. Select the new theme by setting the XCFontAndColorCurrentTheme value to fileComp.xccolortheme
Edit the font values in new theme file fileComp.xccolortheme. Quit and restart FileMerge each time to apply.

How do I build an Xcode shortcut for frequently used code snippet? [duplicate]

When I follow all the instructions (including apple's video) to drag text to create a code snippet in xcode, I get a different system behavior: all I see is the selection ibeam... I can't drag. It just ends up selecting text again. Am i missing some obvious Apple-ism?
Thanks
Yes, I ran into the same problem, and Apple-ism seems to be a good term for this issue :)
It works this way:
Select (or highlight) the code your want to turn into a snippet
EDIT: Click and hold (do not drag!) on any part of the selected text for a short moment (like 2 seconds, sometimes 8 seconds)
EDIT: The mouse cursor will change icon (not on El Capitan).
Now you can drag the code over the snippets library, where a green + icon will appear. EDIT: On El Capitan the green icon does not appear, but the frame of the code snippets window will become thinner.
This happened to me as well. The given solution didn't work but still needed to create snippets.
This is a workaround although not the best option, it works.
From Xcode, select the snippet window, and leave it selected.
Open a text editor app.
From Xcode, select and copy the code you want to use to create your snippet.
Paste it into your text editor and then select all of it.
Now drag&drop normally from the text editor into the snippets window in Xcode.
As said, not the best option but it works.
(Note for Xcode 8.1) Sometimes selecting the text and maintain the mouse button clicked for 3..8 seconds the cursor turns into an arrow and it's possible to D&D. Too bad it only works sometimes...
On High Sierra 10.13.3 and XCode 9 I faced the same problem. The decision that works for me is selecting code on a blank space before the first symbol and then dragging it to the snippets library.
Important: you need to drag only from the blank space (look at the screenshot below). Otherwise you will reselect your code again.
The cursor changes only when you start dragging, so don't be confused and don't wait until it changes.
I've run into this problem with Xcode 7.2 on Mac OS X 10.11.2 (El Capitan). Click and hold on the selection and the cursor never changes from the I-beam to the arrow for dragging.
Although MLBDG's answer is a usable workaround, I found that quitting and restarting Xcode fixed the problem. This might not work for everyone, but it's worth a try if you're having difficulty.
just highlight your text
copy in filter text field that u can see on your bottom of snippet library
paste the text
now select the text and drag from there to snippet library
The answer is really !undisobvious. You need to select a chunk of text. Then click on actual text characters, but without moving the mouse. Only then will the gods of XCode bequeath unto you a draggable snippet of code to do with as you please. Should you dare to miss the text and click in empty but selected space, the demons of XCode will strike down your selection and make you start from scratch. The unfortunate will not even realise this feature actually exists.
Hold option to duplicate it. For instance to make a duplicate case statement without destroying your copy buffer, then replace the case you cleverly have ready to paste during your search.
As a UI designer it is not obvious to me why this has such an unreliable twitchy implementation.

Visual Studio colors not loaded correctly

I use a custom color scheme in Visual Studio (black background, gray text, etc.). There a few settings that refuse to change, however. For example, when cursoring through the markup for an aspx page, the current tag defaults to black text, which doesn't work well on my black background. I've previously changed the appropriate setting to a "visible" color. In fact, to fix it, all I have to do is open the Options window, check and uncheck the Bold setting on Plain Text and hit OK, and now all my chosen settings are properly loaded. If I open a new session though, I have to go through these steps again. There are only a few settings where I notice this behavior (the Read-Only Region is another one), but it's annoying to have to do a dummy option change to get them to kick in. Has anyone seen this behavior before, and does anyone have a fix/workaround?
UPDATE: Found an interesting fix. I still don't know what the root cause is (probably some corruption as #sliderhouserules suggessts), but I've got a quicker way to fix it than using Tools | Options | Fonts and Colors. I simply exported my current color settings and created a macro to load them in:
Public Sub ImportColors()
DTE.ExecuteCommand("Tools.ImportandExportSettings", "-import:""C:\Documents and Settings\gregf\My Documents\Visual Studio 2008\Settings\FontsAnColors_Exported-2008-12-05.vssettings""")
End Sub
I then mapped that macro to a button on my toolbar. Now I have a one-click fix whenever my colors go awry. Not ideal, but much less painful now.
Sounds to me like you may have some corruption in your VS install or something (IE you need to reinstall VS). This doesn't sound like a bug, and you'd be fishing in the dark trying to repair your registry or whatever config files are involved in setting and storing these options for VS.

Resources