• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Script to periodically replace fontfiles in the font folder


New Member
May 31, 2019
1 (0.00/day)

A friend of mine asked me for some help regarding a university project of hers in design. She wanted to create a font that is based of letters carved on trees, and thought it would be a fun idea to have that font periodically change over time, to mimic the process of a tree growing and widening the letters in the process.
So she wanted to know if it was possible to have a script that periodically, lets say every 2 weeks, looks for the fontfile that she's using, and replaces it with a "newer" one, with the same filename, so that if you would open a PDF containing the font the font inside would have changed?

She has already made several different fonts, that would periodically take one anothers place, and I'm just wondering how the script to replace them would go, unfortunately I'm severely lacking the expertise in this, and would greatly appreciate some pointers!

What kind of script am I looking to create, and how greatly does it differ on Windows and iOS?
Thanks a lot!
May 13, 2015
130 (0.07/day)
Processor AMD Ryzen 3800X / AMD 8350
Motherboard ASRock X570 Phantom Gaming X / Gigabyte 990FXA-UD5 Revision 3.0
Cooling Stock / Corsair H100
Memory 32GB / 24GB
Video Card(s) AMD Radeon 290X (Toggling until 5950XT)
Storage C:\ 1TB SSD, D:\ RAID-1 1TB SSD, 2x4TB-RAID-1
Display(s) Samsung U32E850R
Case be quiet! Dark Base Pro 900 Black rev. 2 / Fractal Design
Power Supply EVGA Supernova 1300G2 / EVGA Supernova 850G+
Mouse Logitech M-U0007
Keyboard Logitech G110 / Logitech G110
If you're talking about doing this on a website it's difficult and I'd focus on dates relative to the user. Unfortunately to create a "growing" effect you'd want to twist and turn individual letters by a few degrees which means every single letter would need to be inside of a span element.

So `Hello`, a five letter word now explodes in to 70 characters, presuming you put the bulk of the code in CSS via nth selectors.

I'm a web designer/developer, not a software developer. Web software is interpreted meaning you save a file and just run it. Software you run as a program with a window like a file manager or a web browser needs to first be compiled (which CPU instructions such as x86 for AMD/Intel/Via for laptops and desktops or ARM for mobile processors -- then there is the operating system, compiling for Linux is not the same as for Windows). I can't really help in that context and the world of software becomes much more fragmented compared to the web (relatively speaking).

However with websites you can (fairly) easily add some cool effects, if you know how to program them. You can use CSS animation and create some basic CSS classes. Unlike ID selectors (#unique_selector {property: value; property: value;}) that select a single unique element on a page a CSS class (.grow_1 {property: value; property: value;}) can be reused. So you do not need to program absolutely every single letter.

<span class="grow_1">H</span>
<span class="grow_2">e</span>
<span class="grow_3">l</span>
<span class="grow_1">l</span>
<span class="grow_2">o</span>

As is this would be much more appropriate for a logo (and a very cool idea indeed). However if you wanted to make all the letters on a page do this well... even if this doesn't slow down the computer (or start the next great wild fire, origin: your office) you'd basically would have to use a JavaScript treeWalker to walk all elements, select their text, split by a non-existent character, put every single character in to a span element, assign it a random grow class and stuff all those spans in to the current element inside of the loop. It could certainly be done.

I think programmatically it would make much more sense to make the letters look like they are blades of grass blowing in the wind because you can only animate small characters of text for so long before they become too big or the animation would be too short for the vast majority of people to appreciate the level of detail that went in to the project.

Most importantly as a developer the absolute most important question is: is someone willing to pay for this?

So while a cool idea this could only be marketed towards limited markets though it would certainly stand out I think if put in front of the right people. However that would be more of a desert and not serve as the meat and potatos of a project unless you are explicitely doing such work as a dedicated designer/animator. I'm not saying no outright, I'm saying to find that yes your friend needs to find the proper justification, understand the technology involved and most importantly consider the time/money ratio.

If they're doing it just for fun use a search engine's image search feature to visually get ideas.