Ego Eram Reputo Posted July 7, 2008 Share Posted July 7, 2008 (edited) Updated 12 December 2010 - 'Recent History' buttons! Update 24 October 2010 - New UI WhichSymbolPlus allows a symbol or character to be chosen and applied to the canvas from any installed font. Thanks to these guys for their help: Pyrochild for his help with the XML loading & saving. Simon Brown who revised and recoded the original codelab plug-in, and was most generous with his time and source. BoltBait for the TextRenderingHint! You will find this plugin located in the RENDER submenu. (New) When you commit a character to the canvas (by clicking OK), the character is saved to the upper most 'History" button (the contents of the other buttons cascade downward). You can easily reproduce the character by running the plugin again and selecting the appropriate 'History' button. Note that the anti-aliasing setting is not saved, nor the color used (the plugin always uses the current primary color). This is the fourth incarnation of this plugin. Here's how the new UI looks...., The UI explained: Select or change a font by clicking on the font name. Choose your symbol by clicking directly on it (it will appear in the preview area and also on the canvas). Click OK to commit the symbol to the canvas. Anti aliasing checkbox chooses between smooth & pixelated. Symbol size is changed with the up/down arrows or by typing a number into the size box. Measurements are in pixels (maximum is 1000). (New) Quickly recall any one of your 10 most recently chosen characters by clicking on one of the 'History' buttons. To install the plugin, download my Plugin Pack and unzip it. Run the *.exe installer (written by BoltBait). Restart paint.net. Edited May 16, 2018 by toe_head2001 Fixed broken Postimg images 5 Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
D3z Posted July 7, 2008 Share Posted July 7, 2008 This could be quite useful. Thanks Quote "Confusion is the welcome mat at the door of creativity." -Michaul Gelb My Gallery Check it out! Link to comment Share on other sites More sharing options...
Ash Posted July 7, 2008 Share Posted July 7, 2008 Cool, thank you! Quote All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ] Link to comment Share on other sites More sharing options...
oma Posted July 7, 2008 Share Posted July 7, 2008 excellent as a webding user I appreciate this will make it vastly easier for others to use these symbols more often. Quote My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
Dalton Posted July 7, 2008 Share Posted July 7, 2008 Thanks. I was thinking of making this a while back.. but I know no C++. Anyway.. thanks. Quote MyBB Tutorials, check out my site. Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 9, 2008 Author Share Posted July 9, 2008 Thanks.I was thinking of making this a while back.. but I know no C++. Anyway.. thanks. I wrote this with codelab, which uses c# I believe. To be honest I find c# remarkably easy to understand and would recommend you grab codelab and go through some of the source files. You might find yourself coding plugins before you know it. :wink: I am always happy to release the source (if requested), though I have to admit a certain brute-force style of getting things to happen rather than any coding finesse Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Mike Ryan Posted July 9, 2008 Share Posted July 9, 2008 If this is CodeLab created than I want src. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 9, 2008 Author Share Posted July 9, 2008 If this is CodeLab created than I want src. Mike, your wish is my command (well, a list of commands anyway....,) This is purely an exercise in getting-it-done, and should not be read as an example of best coding practice :!: Feel free to ask if there is anything you want explained. /*============================================================================== WhichSymbol.cs (c) 2008 Ego Eram Reputo Description: Draws a selectable symbol from the Webdings/Webdings fonts. ==============================================================================*/ #region UICode int Amount1=42; // [32,255] Character int Amount2=150; // [8,255] FontSize int Amount3 = 1; // [1,4] Webdings Wingdings Wingdings2 Wingdings3 bool Amount4 = true; // [0,1] Show Entire Font #endregion void Render(Surface dst, Surface src, Rectangle rect) { // Init variables and settings string symbol; Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); Graphics g = new RenderArgs(dst).Graphics; g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; g.Clip = new Region(rect); ColorBgra PC = (ColorBgra)EnvironmentParameters.PrimaryColor; SolidBrush B1 = new SolidBrush(Color.FromArgb(PC.A, PC.R, PC.G, PC.); Font F1 = new Font("Webdings", Amount2); Font F2 = new Font("Wingdings", Amount2); Font F3 = new Font("Wingdings 2", Amount2); Font F4 = new Font("Wingdings 3", Amount2); Font F7 = new Font("Arial", 10); Font F11 = new Font("Webdings", 16); Font F12 = new Font("Wingdings", 16); Font F13 = new Font("Wingdings 2", 16); Font F14 = new Font("Wingdings 3", 16); // Clear the canvas by copying existing image (source) to destination for(int y = rect.Top; y < rect.Bottom; y++) for (int x = rect.Left; x < rect.Right; x++) dst[x,y] = src[x,y]; // draw a single symbol if we are not drawing the whole lot if (Amount4==false) { switch (Amount3) { case 1: symbol = Convert.ToString((char)Amount1); g.DrawString(symbol, F1, B1, selection.Left, selection.Top); break; case 2: symbol = Convert.ToString((char)Amount1); g.DrawString(symbol, F2, B1, selection.Left, selection.Top); break; case 3: symbol = Convert.ToString((char)Amount1); g.DrawString(symbol, F3, B1, selection.Left, selection.Top); break; case 4: symbol = Convert.ToString((char)Amount1); g.DrawString(symbol, F4, B1, selection.Left, selection.Top); break; } } // Or if we are drawing them all..., if (Amount4==true) { // Start with a clear the canvas for(int y = rect.Top; y < rect.Bottom; y++) for (int x = rect.Left; x < rect.Right; x++) dst[x,y] = src[x,y]; // loop to write top character codes for (int File=1; File<=15; File++) { symbol = "+" + Convert.ToString(File); g.DrawString(symbol, F7, B1, selection.Left+(File*32), selection.Top+1*16); } // loop to draw all characters for (int Rank=0; Rank<=14; Rank++) { for (int File=0; File<15; File++) { // Draw characters switch (Amount3) { case 1: symbol = Convert.ToString((char)(32+(Rank*15)+File)); g.DrawString(symbol, F11, B1, selection.Left+((File+1)*32), selection.Top+((Rank+1)*2*16)); break; case 2: symbol = Convert.ToString((char)(32+(Rank*15)+File)); g.DrawString(symbol, F12, B1, selection.Left+((File+1)*32), selection.Top+((Rank+1)*2*16)); break; case 3: symbol = Convert.ToString((char)(32+(Rank*15)+File)); g.DrawString(symbol, F13, B1, selection.Left+((File+1)*32), selection.Top+((Rank+1)*2*16)); break; case 4: symbol = Convert.ToString((char)(32+(Rank*15)+File)); g.DrawString(symbol, F14, B1, selection.Left+((File+1)*32), selection.Top+((Rank+1)*2*16)); break; } } // draw the number codes symbol = Convert.ToString(31+(Rank*15)); g.DrawString(symbol, F7, B1, selection.Left, selection.Top+5+((Rank+1)*2*16)); } } } Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 9, 2008 Author Share Posted July 9, 2008 Found a bug of my own making! The final column of symbols was not being drawn when the "Show All" mode was being used. See the top image in my first post, the top row ends with symbol 31+14=45, but the second row starts with symbol 46+1=47. Thus symbol 46 was missing (the missing link). The *.zip file has been updated to correct this and the source listed above amended. I'm not going to change the images because I'm sure you all get the idea. I only found this because I actually wanted to use a symbol I knew existed and couldn't find it - you can imagine my frustration as I searched for it! Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
BoltBait Posted July 9, 2008 Share Posted July 9, 2008 I just wanted to let you know that I simply LOVE this plugin. 8) Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
R3VENGE Posted July 9, 2008 Share Posted July 9, 2008 thanks for the plugin it will really help in making psp and ps3 fonts Quote psn id: R3V-fiR3 Link to comment Share on other sites More sharing options...
rwp80 Posted July 10, 2008 Share Posted July 10, 2008 Nice plugin! When I need to input symbols, now I don't need to abuse MSWord anymore! :wink: Quote ::: My Gallery ::: ::: Color Target Plugin Pack ::: Link to comment Share on other sites More sharing options...
Mike Ryan Posted July 11, 2008 Share Posted July 11, 2008 Do you mind if I post a bit of a mini tutorial in here explaining how to add new font types and compile in Code Lab? I know that is the first thing I did with your code for all of my Dafont downloaded dingbats. Quote Link to comment Share on other sites More sharing options...
oma Posted July 11, 2008 Share Posted July 11, 2008 actually Mike I'd be interested in that. I have a few fonts I use for lace making that I hit and pick at keyboard until I get the correct one. Quote My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 11, 2008 Author Share Posted July 11, 2008 Do you mind if I post a bit of a mini tutorial in here explaining how to add new font types and compile in Code Lab? I know that is the first thing I did with your code for all of my Dafont downloaded dingbats. I don't mind at all, but I think a new topic might be in order? You're probably best slotting it into the Effects/API forum. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Mike Ryan Posted July 14, 2008 Share Posted July 14, 2008 For those interested in a basic tutorial on adding font types, please read this tutorial: viewtopic.php?f=5&t=25502 Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted July 15, 2008 Share Posted July 15, 2008 Here is my modification of this plugin that supports custom fonts and a (hopefully) simpler dialog. This ZIP only contains the assembley, I will leave the decision to EER over whether to publish the source. WhichSymbolPlus.zip Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 15, 2008 Author Share Posted July 15, 2008 Here is my modification of this plugin that supports custom fonts and a (hopefully) simpler dialog. This ZIP only contains the assembley, I will leave the decision to EER over whether to publish the source. I've already published the codelab source, so these modifications are entirely yours. Please feel free to make the source available as you wish. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Simon Brown Posted July 15, 2008 Share Posted July 15, 2008 Here is my modification of this plugin that supports custom fonts and a (hopefully) simpler dialog. This ZIP only contains the assembley, I will leave the decision to EER over whether to publish the source. I've already published the codelab source, so these modifications are entirely yours. Please feel free to make the source available as you wish. I made few changes to the source, so surely claiming the modifications as mine would be parasitic? Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 16, 2008 Author Share Posted July 16, 2008 I've already published the codelab source, so these modifications are entirely yours. Please feel free to make the source available as you wish.I made few changes to the source, so surely claiming the modifications as mine would be parasitic? Lets call it a joint effort Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Simon Brown Posted July 16, 2008 Share Posted July 16, 2008 I've already published the codelab source, so these modifications are entirely yours. Please feel free to make the source available as you wish.I made few changes to the source, so surely claiming the modifications as mine would be parasitic? Lets call it a joint effort That would be similar to calling Babya PhotoPro a joint effort between Rick Brewster and aafuss. This plugin is your project and your work, all I did is add a UI and a few classes. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 16, 2008 Author Share Posted July 16, 2008 ....all I did is add a UI and a few classes. That's enough for me to call it a joint effort. Seriously. I have updated the original post to link to your version, and retained the original ( for users would like to follow Mikes' tutorial :http://paintdotnet.forumer.com/viewtopic.php?f=5&t=25502 and fiddle with it in codelab). Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Simon Brown Posted July 16, 2008 Share Posted July 16, 2008 That's enough for me to call it a joint effort. Seriously. If you believe so I will accept this. One thing, I reccomend attaching the modification to the first post rather than linking to the direct post, as this will allow users to easily select which one they wish to download. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 16, 2008 Author Share Posted July 16, 2008 I reccomend attaching the modification to the first post rather than linking to the direct post, as this will allow users to easily select which one they wish to download. A couple of minor problems with your new version of the plug-in: 1. Spelling error in "Character" :wink: 2. Column numbering uses the selected font, so if the font doesn't have digits, the column offsets are not numerals. See Webdings/wingdings selections. You might want to tickle the font used for the column offsets (top) to the same one as the row offsets (left). If you want to make these minor changes, I'll then provide the link in my original post. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
chrisjw37 Posted July 16, 2008 Share Posted July 16, 2008 "Which Symbol" module Tried it - Feedback It only allows one to select (or type a number) for a character upto 125 Which reminds me of the old ASCII limit of 124 Related? Anyhoo - as I wanted little arrows and side facing triangles to bung over the top of screen shots of medical software - I can't use it; which a pity really. I liked the idea. Quote CjW Edit by Rick: Sorry, no flashy animations in avatars or signatures. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.