# FONT\_PATTERN discussion and understanding

**URL:** <https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243>\
**Category:** ProffieOS\
**Created:** [September 6, 2025, 2:59am UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243 "2025-09-06T02:59:59Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![olivierflying747-8](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/olivierflying747-8/32/5228_2.png) [@olivierflying747-8](https://crucible.hubbe.net/u/olivierflying747-8)\
**Post date:** [September 6, 2025, 2:59am UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/1 "2025-09-06T02:59:59Z")

</div>

I first read about FONT\_PATTERN here:

> [@Gearing up for OS8](https://crucible.hubbe.net/t/gearing-up-for-os8/5518/39):
>
> Another feature that you may want to add support for is the FONT\_PATTERN define. Basically, it lets you specify what the font path given a specific directory. The default is of course "\*;common", but you could also set it to "\*;voice" if you prefer. Or "\*;common;voice" if you feel like you need two common directories. Or "override;\*;common" or "override;\*;extras/\*;\*/Proffie;common". There are functions in strfun.h that converts back and forth between a single directory, like "TeensySF" and the full font path, which in the last example above would be "override;TeensySF;extras/TeensySF;TeensySF/Proffie;common". One possible use case for this is to have font-specific voice packs. You could for instance do: "\*;\*/voice;common". You would need to create a “voice” directory in every font directory, and then you can (optionally) stick a voice pack in there to override the files in “common”.

Then in the POD:

> **[The CONFIG\_TOP section](https://pod.hubbe.net/config/the-config_top-section.html#fontpattern)**
>
> Documentation for ProffieOS

The first problem I have is with the POD itself:

- when an asterix (`*`) is used in the text, instead of showing an `*` symbol, I will start to see _text in italic starting where the first_ `*`_was supposed to show and finishing when the next_ `*` was supposed to appear but doesn’t however the text is “no longer in _italic_” (I am using Firefox browser on Windows10 if that makes any difference)  
I know that I am not supposed to post screenshot of text (and I will be very happy to delete this screenshot) but this is what I see:

Edit: screenshot deleted.

No asterix (`*`) is showing in the text. I can only understand the POD because I re-read multiple times both the POD and the “gearing-up-for-os8” thread about FONT\_PATTERN. By the way, the define “FONT\_PATTERN” text doesn’t seem to be able to “automatically” turn itself into a link like CONFIG\_TOP does.

Now that my preliminary thoughts about FONT\_PATTERN are out of the way, I will try my best to explain what I thought it would be able to do when I first read about it, what I think it actually does & what I think it “should” be able to do.

- what I thought it would do:
  1. Let’s imagine OS8.x is live (no longer in Beta testing)
  2. the config generator has been updated to the latest OS8.x bells and whistles
  3. a new to ProffieOS user comes along and make his first ever simple OS8 config with 1 blade and 2 buttons. I would imagine it would look like this:

```auto
// ProffieOS8 config
#ifdef CONFIG_TOP
#include "proffieboard_v3_config.h"
#define NUM_BLADES 1
#define NUM_BUTTONS 2
#define VOLUME 1000
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 1.0
                                                 // <- note the "missing defines" that are no longer here because they are "ON" by default in OS8, including the new #define FONT_PATTERN "*;common"
#endif

#ifdef CONFIG_PRESETS
Preset presets[] = {
   { "TeensySF", "tracks/venus.wav",
    StyleNormalPtr<CYAN, WHITE, 300, 800>(), "cyan"},
   { "SmthJedi", "tracks/mars.wav",
    StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(), "blue"},
   { "SmthGrey", "tracks/mercury.wav",
    StyleFirePtr<RED, YELLOW>(), "fire"},
   { "SmthFuzz", "tracks/uranus.wav",
    StyleNormalPtr<RED, WHITE, 300, 800>(), "red"},
   { "RgueCmdr", "tracks/venus.wav",
    StyleFirePtr<BLUE, CYAN>(), "blue fire"},
   { "TthCrstl", "tracks/mars.wav",
    StylePtr<InOutHelper<EASYBLADE(OnSpark<GREEN>, WHITE), 300, 800> >(), "green"},
   { "TeensySF", "tracks/mercury.wav",
    StyleNormalPtr<WHITE, RED, 300, 800, RED>(), "white"},
   { "SmthJedi", "tracks/uranus.wav",
    StyleNormalPtr<AudioFlicker<YELLOW, WHITE>, BLUE, 300, 800>(), "yellow"},
   { "SmthGrey", "tracks/venus.wav",
    StylePtr<InOutSparkTip<EASYBLADE(MAGENTA, WHITE), 300, 800> >(), "magenta"},
   { "SmthFuzz", "tracks/mars.wav",
    StyleNormalPtr<Gradient<RED, BLUE>, Gradient<CYAN, YELLOW>, 300, 800>(), "gradient"},
   { "RgueCmdr", "tracks/mercury.wav",
    StyleRainbowPtr<300, 800>(), "rainbow"},
   { "TthCrstl", "tracks/uranus.wav",
    StyleStrobePtr<WHITE, Rainbow, 15, 300, 800>(), "strobe"},
   { "TeensySF", "tracks/venus.wav",
    &style_pov, "POV"},
   { "SmthJedi", "tracks/mars.wav",
    &style_charging, "Battery\nLevel"}
};
BladeConfig blades[] = {
 { 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), CONFIGARRAY(presets) },
};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif

```

Then that user would add a CONFIG\_PROP section with a prop file that needs a voicepack.  
4) that same user would have downloaded and “installed” the default SD font/tracks package on his SD card and a voicepack in a common folder on his SD card as well (let’s just say for the sake of arguments that all the files “that should be on his SD-card” are exactly where they should be, “lucky first try user”)  
5) he is not aware that the default presets could and should be changed from “TeensySF” to “TeensySF;common” so he doesn’t do it.  
6) because of the hidden “magic” of FONT\_PATTERN, everything worked perfectly on the first try. What a lucky first time user!

That is what I was expecting/hoping FONT\_PATTERN would do after reading the “gearing-up-for-os8” thread for the first time. I don’t think it can do that?

- what I now think it does:

- what I whish it could do: everything I wrote about above, plus be some sort of an “OS wide `*.wav` (and maybe even`*.bmp/pbm/pqf`) global search path” for any non-font specific file like voicepack/sound\_library sounds, error sounds, multi\_prop sounds, any and all spoken digits/numbers, battery, …  
First ProffieOS looks in the font folder, then in the FONT\_PATTERN “default folder” no matter if it is in the preset “font folder path” or not. And then only after that a beeper or talkie sound could be initiated if the `*.wav` file is missing. Maybe I am dreaming ?

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [September 6, 2025, 5:37am UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/2 "2025-09-06T05:37:10Z")

</div>

> [@olivierflying747-8](#):
>
> No asterix (`*`) is showing in the text. I can only understand the POD because I re-read multiple times both the POD and the “gearing-up-for-os8” thread about FONT\_PATTERN. By the way, the define “FONT\_PATTERN” text doesn’t seem to be able to “automatically” turn itself into a link like [CONFIG\_TOP](https://pod.hubbe.net/config/the-config_top-section.html) does.

This should be fixed now.

> [@olivierflying747-8](#):
>
> what I now think it does:

This is correct.

> [@olivierflying747-8](#):
>
> I don’t know if this will also apply with saber\_fett263\_buttons.h if `#define FETT263_EDIT_MODE_MENU` is defined instead of MENU\_SPEC\_TEMPLATE or not?

I think the fett263 menus still expect “\*;common”, regardless of FONT\_PATTERN for now.

> [@olivierflying747-8](#):
>
> what I whish it could do

I suppose it could work like that.  
It would make things a little simpler, and since everything has to follow the same pattern anyways, it might make more sense. The only reason I didn’t make it work like that is that the fett263 prop already expects “\*;common” everywhere.

---

<div class="post-metadata">

**Author:** ![olivierflying747-8](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/olivierflying747-8/32/5228_2.png) [@olivierflying747-8](https://crucible.hubbe.net/u/olivierflying747-8)\
**Post date:** [September 6, 2025, 10:31am UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/3 "2025-09-06T10:31:06Z")

</div>

> [@profezzorn](#):
>
> This should be fixed now.

Perfect, much better.

I am not sure I understand this sentence:  
“Note that, in order for ProffieOS to be able to extract the font directory from the font search path, all presets in your config file must have font search paths that match the pattern.”  
Does that mean that if one preset has a different font search path then all the others, will that “break” the FONT\_PATTERN behavior for all presets or just for that one preset with a different font search path pattern.

> [@profezzorn](#):
>
> The only reason I didn’t make it work like that is that the fett263 prop already expects “\*;common” everywhere.

I guess this the line responsible for that:

> <https://github.com/profezzorn/ProffieOS/blob/bea70a73f55c9469abf9bd28e377882bfef416c7/props/saber_fett263_buttons.h#L2985>

How would it need to be changed to become compatible with FONT\_PATTERN ?

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [September 6, 2025, 7:49pm UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/5 "2025-09-06T19:49:43Z")

</div>

> [@olivierflying747-8](#):
>
> How would it need to be changed to become compatible with FONT\_PATTERN ?

basically, it would need to remove line 2985 and 2986 and do this instead:

```cpp
  current_preset_.font = format_pattern(FONT_PATTERN, font);

```

---

<div class="post-metadata">

**Author:** ![olivierflying747-8](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/olivierflying747-8/32/5228_2.png) [@olivierflying747-8](https://crucible.hubbe.net/u/olivierflying747-8)\
**Post date:** [September 7, 2025, 2:40am UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/6 "2025-09-07T02:40:34Z")

</div>

Thank you @profezzorn , I have already made the change on my local copy. I hope that @Fett263 will do the same on the master copy. I can see this as a great step forward to greatly reduce the size of the talkies code and replace the errors sounds with higher quality (and customizable) “.wav” errors. 🤞🏻

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [September 7, 2025, 2:43am UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/7 "2025-09-07T02:43:01Z")

</div>

> [@olivierflying747-8](#):
>
> I can see this as a great step forward to greatly reduce the size of the talkies code and replace the errors sounds with higher quality (and customizable) “.wav” errors. 🤞🏻

How?  
Why?  
Whut?

---

<div class="post-metadata">

**Author:** ![olivierflying747-8](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/olivierflying747-8/32/5228_2.png) [@olivierflying747-8](https://crucible.hubbe.net/u/olivierflying747-8)\
**Post date:** [September 7, 2025, 3:05am UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/8 "2025-09-07T03:05:21Z")

</div>

As a first step forward then. If FONT\_PATTERN can be used to find most error .wav as an OS wide search path, independently of any props. Then most talkie error can be replaced by a “`*`.wav” file, as discussed in the other thread. Or did I get what could be possible with FONT\_PATTERN completely wrong ?

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [September 7, 2025, 3:52am UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/9 "2025-09-07T03:52:47Z")

</div>

FONT\_PATTERN isn’t used to find anything, at least not directly.  
FONT\_PATTERN is only used when you use a menu to modify a preset.  
I think what you want is similar to font path, but different.  
I suspect that what you want is actually really simple:

Just try to play a wav file falling back on talkie or beeps. (name of wav depends on the error.)  
If the wav doesn’t doesn’t exist or can’t be found, just fall back on what we already have.

This has been suggested before, as a way to customize the error messages, but I pointed out that error messages really shouldn’t occur once you have finished your saber, and we don’t need vader telling us that there is an error in your font directory while working on the saber.

However, make sense as a way to save memory without having to rely on beep codes.  
Of course, if you mess up your fonts and voice packs somehow so that you don’t have the right wav files, you still get beep codes and you might have to use the serial monitor to figure out what’s wrong.

FONT\_PATH has no impact on this.

---

<div class="post-metadata">

**Author:** ![Fett263](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/fett263/32/214_2.png) [@Fett263](https://crucible.hubbe.net/u/Fett263)\
**Post date:** [September 7, 2025, 11:53am UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/10 "2025-09-07T11:53:13Z")

</div>

> [@profezzorn](#):
>
> I think what you want is similar to font path, but different.

Not really following what’s being asked. If a change to my prop is helpful to users and doesn’t impact existing functionality, I’m fine with it, but I’m not really sure what this is about or if it’s actually needed.

---

<div class="post-metadata">

**Author:** ![olivierflying747-8](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/olivierflying747-8/32/5228_2.png) [@olivierflying747-8](https://crucible.hubbe.net/u/olivierflying747-8)\
**Post date:** [September 7, 2025, 12:49pm UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/11 "2025-09-07T12:49:49Z")

</div>

> [@profezzorn](#):
>
> Just try to play a wav file falling back on talkie or beeps. (name of wav depends on the error.)  
> If the wav doesn’t doesn’t exist or can’t be found, just fall back on what we already have.

That is exactly what I want.

> [@profezzorn](#):
>
> However, make sense as a way to save memory without having to rely on beep codes.

No without having to rely on **talkie codes** as they take a lot of memory. beep codes are retained as a fall back because they only take very little memory, however beep codes can be hard to differentiate.

> [@profezzorn](#):
>
> error messages really shouldn’t occur once you have finished your saber

I agree for “error\_in\_blade\_array”, once the saber is finished, that error shouldn’t occur. My saber will never be finished though because I’ll keep changing the fonts so all the other errors can and will occur. And I would rather have Vader telling me what that error is than the talkies telling me what’s wrong.

> [@Fett263](#):
>
> Not really following what’s being asked. If a change to my prop is helpful to users and doesn’t impact existing functionality, I’m fine with it, but I’m not really sure what this is about or if it’s actually needed.

When FONT\_PATH was introduced in the [Gearing up for OS8](https://crucible.hubbe.net/t/gearing-up-for-os8/5518) thread, you had asked:

> [@Gearing up for OS8](https://crucible.hubbe.net/t/gearing-up-for-os8/5518/42):
>
> This is the default for my prop, so would I need to do anything to enable it or is it already in prop\_base?

But you never got an answer on how to make your edit mode compatible with that define.  
And the answer is:

> [@profezzorn](#):
>
> basically, it would need to remove line 2985 and 2986 and do this instead:
> 
> `current_preset_.font = format_pattern(FONT_PATTERN, font);`

I always thought that having to name my common folder as “common” to be compatible with your prop (instead of “\_common” or “voicepack”, or what ever the user preference is) was a limitation in your prop.

With FONT\_PATTERN, that limitation disappears if you choose to make your edit mode compatible with FONT\_PATTERN. And it will be transparent to the user because FONT\_PATTERN will default to “`*`;common” if not defined in the config.

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [September 7, 2025, 9:35pm UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/12 "2025-09-07T21:35:26Z")

</div>

> [@olivierflying747-8](#):
>
> > [@profezzorn](#):
> >
> > Just try to play a wav file falling back on talkie or beeps. (name of wav depends on the error.)  
> > If the wav doesn’t doesn’t exist or can’t be found, just fall back on what we already have.
> 
> That is exactly what I want.

If we had this, would you still want/need the “minimal talkie”?

---

<div class="post-metadata">

**Author:** ![olivierflying747-8](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/olivierflying747-8/32/5228_2.png) [@olivierflying747-8](https://crucible.hubbe.net/u/olivierflying747-8)\
**Post date:** [September 7, 2025, 10:25pm UTC](https://crucible.hubbe.net/t/font-pattern-discussion-and-understanding/7243/13 "2025-09-07T22:25:00Z")

</div>

> [@profezzorn](#):
>
> If we had this, would you still want/need the “minimal talkie”?

I would say yes and no:

- yes I would want it because “sd\_card\_not\_found” can’t ever be played from the SD-card, and I would rather have a good military “No.S.D” than a beeper,
- but no I wouldn’t need it because with just one error that would still need to be at least a beeper, it would be easy enough to identify what that error is. I would however change the beeper to an “S-O-S”, at least on my local copy, because that I can always recognize.

So to fully answer your question, if we had “that”, the minimal talkie wouldn’t be absolutely necessary, just nice to have as an option. IMHO
