Arabic text in generated images needs both a compatible font and proper shaping and right-to-left handling. Here is how to diagnose and fix each layer.
Tag Archives: image size
How to Wrap Mixed CJK and English Text in Generated Images
The main lesson is simple: mixed Japanese, Chinese, Korean, and English text needs more than ordinary word wrapping. A reliable image renderer must choose a font with the right glyphs, preserve Latin words, allow CJK text to break between characters, and invalidate old cached images after the logic changes. Why normal wrapping fails English text Continue reading “How to Wrap Mixed CJK and English Text in Generated Images”
How to Reduce Peak Memory in PHP GD Image Generation
What I learned about preventing PHP GD memory errors by releasing intermediate images as soon as they are no longer needed.
Show Image Size in Terminal or Shell
The easiest way to show the file size in Terminal in Mac or Linux. ustins-MacBook-Pro:jpg juzhax$ file 001.jpg 001.jpg: JPEG image data, EXIF standard Justins-MacBook-Pro:jpg juzhax$ identify 001.jpg 001.jpg JPEG 720×468 720×468+0+0 8-bit sRGB 59.8KB 0.000u 0:00.009 Justins-MacBook-Pro:jpg juzhax$
