#! /bin/sh # -*- tcl -*- \ exec tclsh "$0" ${1+"$@"} set ::env(BUILD_BATCH) "NO" ;# YES suppresses tcl package build when not developing code. #set ptclBaseDir /home/pokorny/ptcl set ptclBaseDir /run/shm/tmpDir/ptcl source ${ptclBaseDir}/runheaders/GenericToolBoxSetUp GenericToolBoxSetUp -rootdir $ptclBaseDir \ -pkgMakeIndex_ptclpov -pkgMakeIndex_ptclutil -pkgMakeIndex_ptclsdllib \ -pkgRequire ptclpov -pkgRequire ptclutil -pkgRequire ptclsdllib ; # This script set up to run after 1311 frames of 50 characters each have # been rendered to images covering the Basic Multilingual Plane (BMP) for # a given mono-pitch font. Frames for which no character glyphs exist are # rendered black and have a small size. Frame images with at least one # character having glyphs are rendered as a table and have a larger size # # We use this size difference to create a subset of frames with indexes # from 1 to N of the table versions. Only these frames become part of an # mp4 animation encoded with ffmpeg. # # The mp4 animation can be viewed to review the characters supported by # the particular font file. set tmpdirVal [pwd] set tmpList [glob -directory $tmpdirVal -nocomplain boolObjPlay????.png] puts "Number of frames found: [llength $tmpList]" set keepList [list] set ignoreList [list] foreach filename $tmpList { if { [file size $filename] < 5000 } { lappend ignoreList $filename } else { lappend keepList $filename } } puts "Keeping [llength $keepList] frames images" set cnt 1 foreach filename $keepList { set rootName [file rootname $filename] set rootName [string range $rootName 0 [expr {[string length $rootName]-5}] ] set newFileName [format {%s__%03d.png} $rootName $cnt] incr cnt puts "copy $filename to $newFileName" file copy -force $filename $newFileName } exit 0;