app
Pup - the AI's own browser
Public Made by Adomby adom
pup gives your AI a real browser on your desktop that it drives completely, in the background, signed in as you: windows that never jump in front of your work, one shared profile that learns your logins, and every window labeled on the taskbar with its AI thread's name.
← Commit history
Hero build: ink-precise left alignment via empirical measured offsets for logo, title, and subtitle (PIL textbbox under-reports Familjen's left bearing at 240px, which put the Pup title 18px right of the logo, caught by the kicad thread)
1 file changed
+21−6
dev-skills/pup-hero-image/build_hero.py+21−6@@ -140,21 +140,36 @@ ImageDraw.Draw(shm).rounded_rectangle([vx+10, vy+16, vx+vw+10, vy+VH+16], R, fil shm = shm.filter(ImageFilter.GaussianBlur(30)); sh.putalpha(shm) bg = Image.alpha_composite(bg, sh); bg.paste(panel, (vx, vy), mask) +def measured_offset(text, font):+ """Empirical ink offset: PIL's textbbox under-reports the left bearing for Familjen at 240px+ (kicad-thread catch 2026-08-09: the title sat 18px right of the logo). Draw on scratch and+ measure where ink ACTUALLY lands, then compensate. Never trust textbbox for alignment."""+ sc = Image.new('RGB', (1400, 500), (0, 0, 0))+ ImageDraw.Draw(sc).text((100, 100), text, font=font, fill=(255, 255, 255))+ bb = sc.getbbox()+ return bb[0] - 100, bb[1] - 100+ # ── left content: logo, title, subtitle (matched to Bridge's hero) ─────────── d = ImageDraw.Draw(bg); inset = int(4.5*CQ) logo = Image.open(A('adom_logo_white.png')).convert('RGBA'); lw = int(11.8*CQ) logo = logo.resize((lw, int(logo.height*lw/logo.width)), Image.LANCZOS)-bg.alpha_composite(logo, (inset, int(3.2*CQ)))+_la = logo.getbbox() # the asset carries transparent padding; land the INK at the inset+bg.alpha_composite(logo, (inset - _la[0], int(3.2*CQ) - _la[1])) f_title = ImageFont.truetype(A('familjen-700.ttf'), int(12*CQ)) # 12cqw = 240px em-bbt = d.textbbox((0, 0), "Pup", font=f_title); ty = int(13.15*CQ)-d.text((inset-bbt[0], ty-bbt[1]), "Pup", font=f_title, fill=(230, 237, 243, 255))+tox, toy = measured_offset("Pup", f_title); ty = int(13.15*CQ)+d.text((inset-tox, ty-toy), "Pup", font=f_title, fill=(230, 237, 243, 255))+bbt = d.textbbox((0, 0), "Pup", font=f_title) # still used for subtitle y-flow f_sub = ImageFont.truetype(A('satoshi-500.ttf'), 50) BLU, WHT = (74, 168, 255, 255), (232, 238, 244, 255) sy = ty + (bbt[3]-bbt[1]) + int(2.6*CQ)-d.text((inset, sy), "A real browser ", font=f_sub, fill=WHT)+# left-bearing compensation on EVERY text draw so all ink edges align with the logo's ink edge+# (kicad-thread catch 2026-08-09: the title compensated, the subtitle didn't -> ragged left edge)+sox, _ = measured_offset("A real browser ", f_sub)+d.text((inset - sox, sy), "A real browser ", font=f_sub, fill=WHT) w1 = d.textlength("A real browser ", font=f_sub)-d.text((inset+w1, sy), "sandbox", font=f_sub, fill=BLU)-d.text((inset, sy+int(50*1.35)), "you fully control.", font=f_sub, fill=WHT)+d.text((inset - sox + w1, sy), "sandbox", font=f_sub, fill=BLU)+sox2, _ = measured_offset("you fully control.", f_sub)+d.text((inset - sox2, sy + int(50*1.35)), "you fully control.", font=f_sub, fill=WHT) # ── BRIDGE pill: solid teal, top-right, inset 2.6cqw ───────────────────────── pf = ImageFont.truetype(A('familjen-700.ttf'), 26); txt = "BRIDGE"