I keep getting the same hollow square wingding!

I'm trying to make a matrix style decryption thing where I go from wingdings to plain text. I have literally no idea how to write in python so I'm using some ai to help me. I've going back and forth to no avail. The concept is there just one pesky issue.

I just want a gif just like this if possible: https://djr.com/images/input-cipher-decode.gif but I keep getting a hollow square wingding in the beginning instead of the text I want.

My code is as follows:

WHERE AM I GOING WRONG????

import os

import random

from PIL import Image, ImageDraw, ImageFont

import imageio

# ===== CONFIGURATION =====

# Your original EXACT Wingdings text

WINGDINGS_TEXT = "✡□◆ ⧫♒♏❒♏. ⚐♑❒♏. -✋. 👌⍓ ⧫♒□ ❒♎♏❒ □♐ ●□❒♎ ☞♋❒❑◆♋♋♎. ✋ ♋❍ ♋◆⧫♒□❒♓⌃♏♎ ⧫□ ◻●♋♍♏ ⍓□◆ ♌□⧫♒ ◆■♎♏❒ ♋❒❒♏⬧⧫. ✌■♎ ⧫❒♋■⬧◻□❒⧫ ⍓□◆ ⧫□ ♎♏⬧♓♑■♋⧫♏♎ ❒♏⬧♏⧫⧫●♏❍♏■⧫ ♐♋♍♓●♓⧫⍓. ⚐♒ ❒♏♋●●⍓? ✡□◆ ♋■♎ ⬥♒♋⧫ ♋❒❍⍓? 👍♋■ ✋ ⬧♋⍓ ⬧□❍♏⧫♒♓■♑ ⧫□ ⍓□◆? ☹♓⬧⧫♏■, ⍓□◆ ⬥♏❒♏ ❒♏♋●●⍓, ❒♏♋●●⍓ ⬧□❍♏⧫♒♓■♑, ♌♋♍🙵 ⧫♒♏❒♏. ✋■♍❒♏♎♓♌●♏. ✌❒♏ ⍓□◆ ⧫♋●🙵♓■♑ ⧫□... ...❍♏?"

# Your target English text

TARGET_TEXT = "You there. Ogre. -I. By the order of lord Farquaad. I am authorized to place you both under arrest. And transport you to designated resettlement facility. Oh really? You and what army? Can I say something to you? Listen, you were really, really something, back there. Incredible. Are you talking to... ...me?"

OUTPUT_NAME = "farquaad_decrypt.gif"

FONT_SIZE = 24 # Slightly larger for better visibility

TEXT_COLOR = (0, 255, 0) # Green

BG_COLOR = (0, 0, 0) # Black

SQUARE_SIZE = 800 # Image dimensions (800x800)

ANIMATION_DURATION = 30 # Seconds

CHARS_PER_STEP = 5 # Characters to decrypt at a time

# =========================

# Get desktop path

desktop = os.path.join(os.path.expanduser("~"), "Desktop")

output_path = os.path.join(desktop, OUTPUT_NAME)

# Generate random glyphs for Matrix effect (using Wingdings range)

def random_wingdings_glyph():

# Ranges for Wingdings 1, 2, and 3

ranges = [

range(0x2700, 0x27BF), # Dingbats

range(0x2600, 0x26FF), # Miscellaneous Symbols

range(0x2900, 0x297F) # Supplemental Arrows-B

]

return chr(random.choice(random.choice(ranges)))

# Load fonts - trying multiple Wingdings versions

try:

font_wingdings = ImageFont.truetype("wingding.ttf", FONT_SIZE) # Windows

except:

try:

font_wingdings = ImageFont.truetype("ZapfDingbats.ttf", FONT_SIZE) # macOS

except:

print("Wingdings font not found - using fallback symbols")

font_wingdings = ImageFont.load_default()

try:

font_target = ImageFont.truetype("arial.ttf", FONT_SIZE)

except:

font_target = ImageFont.load_default()

# Create text layout function

def create_text_frame(text, use_wingdings=False):

img = Image.new("RGB", (SQUARE_SIZE, SQUARE_SIZE), BG_COLOR)

draw = ImageDraw.Draw(img)

# Split text into lines that fit

lines = []

current_line = ""

current_font = font_wingdings if use_wingdings else font_target

for char in text:

test_line = current_line + char

if current_font.getlength(test_line) <= SQUARE_SIZE * 0.9:

current_line = test_line

else:

lines.append(current_line)

current_line = char

if current_line:

lines.append(current_line)

# Draw centered text

y = (SQUARE_SIZE - len(lines) * FONT_SIZE) // 2

for line in lines:

x = (SQUARE_SIZE - current_font.getlength(line)) // 2

draw.text((x, y), line, font=current_font, fill=TEXT_COLOR)

y += FONT_SIZE

return img

# Create frames

frames = []

total_chars = min(len(WINGDINGS_TEXT), len(TARGET_TEXT))

# Initial frame - pure Wingdings

frames.append(create_text_frame(WINGDINGS_TEXT, True))

# Create decryption frames

for step in range(0, total_chars + CHARS_PER_STEP, CHARS_PER_STEP):

decrypted_chars = min(step, total_chars)

# Transition frames with random glyphs

for _ in range(3):

current_text = []

for i in range(total_chars):

if i < decrypted_chars:

current_text.append(TARGET_TEXT[i]) # Decrypted

else:

if random.random() < 0.7: # 70% chance for random glyph

current_text.append(random_wingdings_glyph())

else:

current_text.append(WINGDINGS_TEXT[i]) # Original Wingdings

frames.append(create_text_frame("".join(current_text)))

# Final frame for this step

current_text = []

for i in range(total_chars):

if i < decrypted_chars:

current_text.append(TARGET_TEXT[i]) # Decrypted

else:

current_text.append(WINGDINGS_TEXT[i]) # Original Wingdings

frames.append(create_text_frame("".join(current_text)))

# Final frames (fully decrypted)

for _ in range(10):

frames.append(create_text_frame(TARGET_TEXT))

# Save as GIF

frame_duration = (ANIMATION_DURATION * 1000) // len(frames)

frames[0].save(

output_path,

save_all=True,

append_images=frames[1:],

duration=frame_duration,

loop=0,

optimize=True

)

print(f"Success! Animation saved to: {output_path}")

Posted May 4, 2025, 4:34 PM UTC

08
Loading comments…