freekmurze,
@freekmurze@phpc.social avatar

💡 TIL has a function that can calculate the bounding box coordinates of a string that’s rendered in a given font
https://www.php.net/manual/en/function.imagettfbbox.php

I’m using this function in an upcoming feature of Oh Dear: status badges. These badges are svgs with variable text (and length)

kgaut,
@kgaut@oisaur.com avatar

Ping @renchap tu ne cherchais pas un truc du genre hier ?

renchap,
@renchap@oisaur.com avatar

@kgaut Si, mais en JS :)

kgaut,
@kgaut@oisaur.com avatar

@renchap ça n'existe pas encore le php-in-js ?

derickr,
@derickr@phpc.social avatar

@freekmurze I just fixed code related to this today, code that was written in 2014 🤣

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • DreamBathrooms
  • magazineikmin
  • cisconetworking
  • tacticalgear
  • mdbf
  • rosin
  • Youngstown
  • slotface
  • khanakhh
  • GTA5RPClips
  • kavyap
  • ngwrru68w68
  • thenastyranch
  • everett
  • anitta
  • ethstaker
  • modclub
  • cubers
  • love
  • normalnudes
  • Durango
  • InstantRegret
  • provamag3
  • tester
  • Leos
  • osvaldo12
  • megavids
  • JUstTest
  • All magazines