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”

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$