(path_list, add_baseline=0., per=22)
return new_path
Makes glyph slightly smaller in viewbox, makes some descenders visible.
Makes glyph slightly smaller in viewbox, makes some descenders visible.
Makes glyph slightly smaller in viewbox makes some descenders visible .
def zoom_out(path_list, add_baseline=0., per=22):
  """Makes glyph slightly smaller in viewbox, makes some descenders visible."""
  # assumes tensor is already unnormalized, and in long form
  new_path = []
  for command in path_list:
    args = []
    is_even = False
    for arg in command[1:]:
      if is_even:
        args.append(str(float(arg) - ((24.-per) / 24.)*64./4.))
        is_even = False
      else:
        args.append(str(float(arg) - add_baseline))
        is_even = True
    new_path.append([command[0]] + args)
  return new_path
def zoom_out ( path_list , add_baseline = 0. , per = 22 ) : # assumes tensor is already unnormalized, and in long form new_path = [ ] for command in path_list : args = [ ] is_even = False for arg in command [ 1 : ] : if is_even : args . append ( str ( float ( arg ) - ( ( 24. - per ) / 24. ) * 64. / 4. ) ) is_even = False else : args . append ( str ( float ( arg ) - add_baseline ) ) is_even = True new_path . append ( [ command [ 0 ] ] + args ) return new_path