Skip to content

Commit

Permalink
Merge pull request mxbi#8 from cjoverbay/issues/7-google-font-group-e…
Browse files Browse the repository at this point in the history
…mbed

Fixes mxbi#7 - Only embed google font when not grouped
  • Loading branch information
mxbi authored Aug 8, 2024
2 parents 23c6b8f + 2c21335 commit ca93c6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arckit/vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def draw_grid(grid, xmax=10, ymax=10, padding=.5, extra_bottom_padding=0.5, grou
bw = border_width / 3 # slightly more than 2 to avoid white border
drawing.append(drawsvg.Rectangle(-bw, -bw, xsize+bw*2, ysize+bw*2, fill='none', stroke=bordercol, stroke_width=border_width))

drawing.embed_google_font('Anuphan:wght@400;600;700', text=set(f'Input Output 0123456789x Test Task ABCDEFGHIJ? abcdefghjklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ'))
if not group:
drawing.embed_google_font('Anuphan:wght@400;600;700', text=set(f'Input Output 0123456789x Test Task ABCDEFGHIJ? abcdefghjklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ'))

# Write size on the bottom right
# drawing.append(drawsvg.Text(text=f'{gridx}x{gridy}', x=-0.05, y=-0.25, font_size=padding/4, fill='black', text_anchor='start'))
Expand Down

0 comments on commit ca93c6c

Please sign in to comment.