 #-----------------------------------------------------------------------------------------------------------
 @get_fallback_glyph = ( me, shape = 'square' ) ->
   # validate.svgttf_metrics me
+  '❶❷❸❹❺❻❼❽❾❿'
   validate.nonempty_text shape
   #.........................................................................................................
   width         = 3 * me.em_size // 4

#-----------------------------------------------------------------------------------------------------------
@save_otjsfont = ( path, otjsfont ) ->
  # FS.writeFileSync path, buffer = otjsfont.toBuffer() # deprecated
  FS.writeFileSync path, buffer = Buffer.from otjsfont.toArrayBuffer()
  return buffer.length

#-----------------------------------------------------------------------------------------------------------
@list_glyphs_in_otjsfont = ( otjsfont ) ->

  return "<!-- #{cid_hex} #{glyph} --><path d='#{pathdata}'/>"

#-----------------------------------------------------------------------------------------------------------
@glyph_from_cid = ( otjsfont, cid ) ->
  validate.positive_integer cid
  R = otjsfont.charToGlyph String.fromCodePoint cid
  return if R.unicode? then R else null

#-----------------------------------------------------------------------------------------------------------
@glyph_and_pathdata_from_cid = ( me, otjsfont, cid ) ->
  validate.positive_integer cid
  fglyph              = @glyph_from_cid otjsfont, cid
  return null unless fglyph?
  path_obj            = fglyph.getPath 0, 0, me.font_size
  pathdata            = path_obj.toPathData path_precision
  return null if pathdata.length is 0
  svg_path            = new SvgPath pathdata
  global_glyph_scale  = me.global_glyph_scale ? 1
  scale_factor        = me.scale_factor * global_glyph_scale
  svg_path            = svg_path.scale scale_factor, -scale_factor
  return { glyph: fglyph, pathdata: svg_path.toString(), }

