This blog post was created with the help of AI π€
Have you ever needed to change an image in your Uniface application? Maybe you want to create a different language version or switch from color to black-and-white? This guide shows you how to modify glyphs in Uniface 10.4 step by step. β¨
What Are Glyphs? πΌοΈ
Glyphs are images in a special Uniface format. They work great for icons, buttons, and small pictures in desktop applications. Think of them as optimized images that Uniface stores and uses throughout your application.
The Important Rule β οΈ
Here is the key thing to remember: You cannot edit glyphs directly inside Uniface. This might seem strange at first, but there is a good reason. Uniface stores glyphs in a proprietary format that regular image editors cannot open.
The Three-Step Process π
Step 1: Export the Glyph (Unload) π€
First, you need to get the glyph out of Uniface:
- Open the Glyph editor in Uniface IDE
- Select the glyph you want to change
- Click on Edit > Unload
What happens now? Uniface creates a bitmap file in your project directory. The original glyph stays safe in the Repository. You are just making a copy to work with. π
Important Detail: Primary and Secondary Images π
Some glyphs have two versions (a primary and a secondary image). When you unload such a glyph, Uniface creates two files:
- Primary image:
filename.bmp
- Secondary image:
filename.amp
Example: If your glyph is called "LOGO_COMPANY", you might get "LOGO_COMPANY.bmp" and "LOGO_COMPANY.amp" files.
Step 2: Edit with Your Favorite Tool π¨
Now comes the fun part! Open the bitmap file with any image editor you like. Popular choices are:
- Paint.NET (free and simple) π
- GIMP (powerful and free) πͺ
- Adobe Photoshop (professional) π―
- Even Microsoft Paint works! βοΈ
Make your changes and save the file. You can create different versions like:
- Language variations (icons with different text)
- Color and monochrome versions
- High contrast versions for accessibility
- Different sizes or styles
Step 3: Bring It Back to Uniface π₯
Now you have two options:
Option A: Replace the Original Glyph π
- Delete the old glyph object in Uniface
- Create a new glyph with the same name
- Load your edited bitmap file
Use this when you want to update an existing glyph everywhere in your application.
Option B: Create a New Variation β
- Select the original glyph object
- Create a new glyph item
- Load your edited bitmap file
This is perfect when you need multiple versions (for example, different languages).
Real-World Example π‘
Let's say you have a "Save" button with English text. You need German and French versions:
- Unload the "BUTTON_SAVE" glyph (creates BUTTON_SAVE.bmp)
- Open the BMP file in your image editor
- Change the text from "Save" to "Speichern" and save as BUTTON_SAVE_DE.bmp
- Change the text to "Enregistrer" and save as BUTTON_SAVE_FR.bmp
- In Uniface, create new glyph items for each language version
- Your application can now show the right button based on the user's language! π
Tips and Tricks π
- Always keep backups: The original glyph stays in the Repository, so you always have a safety net π‘οΈ
- Consistent naming: Use clear names like ICON_SAVE_COLOR and ICON_SAVE_MONO π
- Test both versions: If you have primary and secondary images, make sure both look good β
- Document your changes: Use the Description field in Uniface to note what you changed π
Common Use Cases π―
- Internationalization: Create icons with text for different languages π
- Theming: Offer light and dark mode versions π
- Accessibility: Make high-contrast versions for users with visual impairments βΏ
- Branding: Update logos when your company rebrands π’
- Seasonal versions: Special holiday themes π
Summary π
Modifying glyphs in Uniface 10.4 is a simple three-step process: export (unload), edit with your favorite tool, and import back (replace or create new). While you cannot edit glyphs directly in Uniface, this workflow gives you complete freedom to use any image editor you like. Remember to handle both primary and secondary images if your glyph has them, and choose the right import method based on whether you want to replace or create a variation. π
Happy coding! π¨βπ»π©βπ»
Top comments (0)