Nyerguds

Westwood Font Editor [Development thread]

38 posts in this topic

v1.5 released.

Pasting images into the editor works now! How they come out depends entirely on the palette you got selected, since it'll match the pasted content on the palette as closely as possible.

A little test with the editor's own icon: (I temporarily changed the first palette color to black to do the paste for this)

fonteditor_18_paste.png

Other features include:

  • Changing the font type
  • A global color replace function
  • ctrl+arrow keys as shortcuts for symbol image data shifting, with ctrl+shift+arrows acting as global shifting of all symbols on the entire font. You may need to click in the main editor area for this to work, as it's disabled on controls that use certain of these shortcuts themselves (like text fields and the grid listing the symbols)
  • A right-click menu on the preview image to copy the image on it to the clipboard.
0

Share this post


Link to post
Share on other sites

Aaaand 1.5.1 released. Derp.

I messed up the paste logic; it tried to take image data before actual font data. Since copying a font symbol copies it both as font symbol data and as image, that means the paste logic never still used the font data version, and so the pasted stuff not only became palette-dependent (with a possibility of messing up colors, especially if that palette had changed), but also lost its Y-offset :dry:

[edit]

1.5.2 released: added some much-needed close confirmation, and finally implemented conversion logic into the "save as" dialog, so you can select the type to save as from the types dropdown list.

Not that I advise that, though; conversion usually needs some more touchups you'll need to do in the editor anyway :P

0

Share this post


Link to post
Share on other sites

Released v1.5.3 yesterday... adding automatic height optimising to the v3 and v4 fonts, giving the text encodings more logical names, and fixing an import bug on the custom Dune 2000 FONT.BIN files (an undocumented feature anyway).

0

Share this post


Link to post
Share on other sites

Fixed a bug that corrupted the clipboard when editing palette colour #0.

 

So, apparently some rogue programmer at Microsoft in the time of the Windows Vista development thought it was a good idea to make double-clicking a Label copy its text to the clipboard. If you're wondering, I use Labels with a background colour set to build up the colour palette.

 

And it was done in such a half-assed way that the fix for it was pretty dumb, too.

0

Share this post


Link to post
Share on other sites

Yup. I actually thought it was the colour picker at first, and was kind of baffled by the fact it didn't seem to happen every time. Then I noticed that when I tried to paste the contents of the clipboard in various programs after the 'corruption', that, when pasted in MS Word, it put a "T" in the document.

Which is the little "Transparency" indicator the palette picker puts on colour #0. :huh:

In other words, it only does it when there's text on the label. The bafflingly stupid fix for it was apparently to make my own Label class which was derived from the original MS Label class, but which had its own new public "Text" property, overriding the original one. The whole Windows UI system adapted to that flawlessly, using the new offered Text stored in my own class... but that clipboard copy logic still seemed to use the internal one in the underlying "Label" itself, which was now never filled in. So yea, whoever did that thing did it in a really hacky way that didn't even use the normal publicly accessible data of the Label object.

(Another weird detail: when pasting the contents in Gimp after that "corruption", the image itself still appeared, despite all programmatic analysis done on the clipboard objects at that point assuring me there was no trace of any image data on the clipboard. Wut. Now I'm really wondering how Gimp accesses the clipboard O_o)

0

Share this post


Link to post
Share on other sites

Fixed a couple of bugs in this, and released v1.5.6.

If you copy a symbol using ctrl+c or the menu, you can now also paste the character as text (as shown in the sidebar, according to the currently chosen text encoding) in text applications.

Seems like a little thing, but when dealing with these Cyrillic letters I really want to open these in something where I can take a closer look at them, lol.

0

Share this post


Link to post
Share on other sites

A couple more micro-releases later, I'm at 1.5.9, lol. Actually using this on a project sure brings a lot of bugs, missing features and little usability nuisances to light.

  • Fixed a crash in the previewer when one of the previewed characters is the last character in the font.
  • Fixed a bug in the font size changing that made it change the wrong dimension (which in turn led to crashes as the symbol size dimensions on the UI tried to adapt the wrong way).
  • Fixed the internal assembly name; it was still "CnCFontEditor".
  • Added shortcuts for "safe" image shifting, expanding the image to the shifted direction (with support for bulk changes)
  • Added shortcuts for changing the Y-offset (with support for bulk changes)
  • Holding down Ctrl now enables colour picker mode, for fast color picking.
  • Optimized refreshing of paint mode and color pick mode.
  • Colour picker now shows a hand cursor.
0

Share this post


Link to post
Share on other sites

This still needs a little more development, but it's a feature I've wanted in there for a looong time; a manager for the palettes, which gives the ability to save edited palettes to a new entry on an external file.

fonteditor_19_pal_edit_1.7.0.png

This can do full management of the palettes, except for one detail: you can't rename the actual palette files. You can name them when creating them, you can delete them, but if you want to rename them, just go and find the files on your disk :P

0

Share this post


Link to post
Share on other sites

Thanks!

I got a new and really cool feature in the making, namely, pasting from clipboard with transparency support. This means that you can actually combine stuff, albeit in a somewhat rudimentary way; you can't really choose the position where it pastes except by adjusting what you copy. But you can get around that by editing / shifting / cutting out the stuff you want to copy in the editor, then copying to clipboard, and then just reverting the symbol you messed up by doing that ;)

Specifically, this it should make it much easier to add diacritics on characters that already exist.

I think I'll separate the options as "paste as symbol" and "paste on symbol".

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.