Commits

Anonymous committed f0a25f5

Fix a rounding error that was cutting off the last row of the icons

  • Participants
  • Parent commits f3dc834

Comments (0)

Files changed (1)

File fugue_icons/fugue_make.py

 import argparse
 import json
 import logging
+import math
 import os
 import pygame
 import StringIO
     archive = zipfile.ZipFile(get_file(url))
     icons = [path for path in archive.namelist()
              if 'icons/' in path and path.endswith('.png')]
-    merged = pygame.Surface((width * size, len(icons) / width * size),
-                            pygame.SRCALPHA)
+    merged = pygame.Surface(
+        (width * size, math.ceil(float(len(icons)) / width) * size),
+        pygame.SRCALPHA,
+    )
     data = {}
     css = [
         COMMENT,