Skip to content

Dataface typography

Dataface is tool create by bonjourmonde

Material Details
Software Python, numpy, svgpathtools, lxml
Machine Mac
Ressources bonjour monde, dataface, gitlab
Files Files tools

A friend instal Python in my laptop and help me for making the first test.


1- Choose Font

  • Choisir une typographie dans le Livre des polices.
  • Finder > Aller > Départ > Dataface > V2

  • Coller la typo.otf

2- Dans le Terminal

  • Convertir la police otf en svg:
cd dataface/v2
fontforge -script 
script.pe 
Syne-ExtraBold.otf

// utiliser TAB pour Completer et trouver la typo dans le terminal // Exemple : Syne = TAB S

Entrer dans le terminal

Result in Terminal :

Result in the finder :

3-RENAME

  • Rename the font .svg in the finder by Forje-Bold.svg

4- Script DATAFACE.PY

  • Modification of the folder

dataface.py

d_array =[]
                if  new_contours is not None:
                    for contour in new_contours:
                        if contour != Path() and contour is not None:
                            d_array.append(contour.d())

                ## quick dirty fix
                ### note close path in a better way ?
                ####
                d_array.append("z")

                ## reexport a path in svg readable path
                #####
                glyph.attrib["d"] = 'z'.join(d_array)

        font_face = svg.findall(".//{http://www.w3.org/2000/svg}font-face")
        font_face[0].attrib["font-family"] = 'Akkurat-modif#'+str(magnet_array[i])
        ## save file in svg
        f = open('Forje-Bold#'+str(magnet_array[i])+'.svg', 'w')
        f.write(ET.tostring(svg, pretty_print=True).decode("utf-8"))
        f.close()

## None for all glyph
processFont(None, len(magnet_array))

#####
  • Save the modifications
  • In the Terminal :
python3 

dataface.py

Result in the Terminal :

Result in Finder :

4- Scriptback.pe

  • reconvert the new font in otf
  • Open the Terminal :
fontforge -script 

script-back.pe

Forje-Bold#20.svg

Result in Finder :

Results

Files test typography


Last update: 2023-10-21