예제 #1
0
def list_fonts():
    u = 'http://sofia.nmsu.edu/~mleisher/Software/cu/'
    collector = html_link_collector()
    with io.open(acquire(u, 'local'), mode='r', encoding='utf-8') as f:
        for line in f:
            collector.feed(line)
    collector.close()
    for link in collector.links:
        if link.endswith('.tgz'):
            # hack for broken link as of Feb 2019
            link = link.replace('www.math.nmsu.edu', 'sofia.nmsu.edu')
            with tarfile.open(acquire(link, 'local'), 'r') as tar:
                for name in tar.getnames():
                    if name.endswith('.bdf'):
                        tar.extract(name, cache_path())
                        path = os.path.join(cache_path(), name)
                        name = name.split('/')[-1][:-4]
                        with open(path, 'r') as bdf:
                            for line in bdf:
                                if line.startswith('FAMILY_NAME'):
                                    name = line[11:].strip()
                                    if name.startswith('"') and name.endswith(
                                            '"'):
                                        name = name[1:-1]
                        yield (name, path, u)
예제 #2
0
def list_fonts():
    u = 'https://apagreekkeys.org/NAUdownload.html'
    collector = html_link_collector()
    with io.open(acquire(u, 'local'), mode='r', encoding='utf-8') as f:
        for line in f:
            collector.feed(line)
    collector.close()
    latestDate = None
    latestLink = None
    for link in collector.links:
        m = re.search('/NAU([0-9_]+)[.]zip$', link)
        if m is not None:
            if latestDate is None or m.group(1) > latestDate:
                latestDate = m.group(1)
                latestLink = link
    with zipfile.ZipFile(
            acquire('https://apagreekkeys.org/' + latestLink, 'local'),
            'r') as zip:
        for info in zip.infolist():
            if info.filename.endswith('.ttf'):
                name = info.filename.split('/')[-1][:-4]
                name = re.sub('newathu', 'New Athena Unicode', name)
                name = re.sub('([a-z])([A-Z])', '\\1 \\2', name)
                name = re.sub('[0-9_]+', '', name)
                yield (name, zip.extract(info, cache_path()), u)
예제 #3
0
def list_fonts():
    with zipfile.ZipFile(
            acquire('https://umihotaru.work/nishiki-teki.zip', 'local'),
            'r') as zip:
        for info in zip.infolist():
            if info.filename.endswith('.ttf'):
                yield ('Nishiki-teki', zip.extract(info, cache_path()),
                       'https://umihotaru.work/')
예제 #4
0
def list_fonts():
    with zipfile.ZipFile(
            acquire('http://www.evertype.com/emono/evermono.zip', 'local'),
            'r') as zip:
        for info in zip.infolist():
            if '._' not in info.filename and info.filename.endswith('.ttf'):
                yield (info.filename[:-4].split('/')[-1],
                       zip.extract(info, cache_path()),
                       'http://www.evertype.com/emono/')
예제 #5
0
def list_fonts():
    with zipfile.ZipFile(
            acquire(
                'http://www.kreativekorp.com/swdownload/fonts/xlang/voynich.zip',
                'local'), 'r') as zip:
        for info in zip.infolist():
            if info.filename.endswith('.ttf'):
                yield (
                    info.filename[:-4], zip.extract(info, cache_path()),
                    'http://www.kreativekorp.com/software/fonts/voynich.shtml')
예제 #6
0
def list_fonts():
	u = 'http://junicode.sourceforge.net/'
	du = 'https://sourceforge.net/projects/junicode/files/latest/download'
	with zipfile.ZipFile(acquire(du, 'local', None), 'r') as zip:
		for info in zip.infolist():
			if info.filename.endswith('.ttf'):
				name = info.filename.split('/')[-1][:-4]
				name = re.sub('([a-z])([A-Z])', '\\1 \\2', name)
				name = re.sub('-', ' ', name)
				yield (name, zip.extract(info, cache_path()), u)
예제 #7
0
def list_fonts():
    for name in ['fluorine', 'fluorinem']:
        with zipfile.ZipFile(
                acquire(
                    'http://www.kreativekorp.com/swdownload/fonts/relay/%s.zip'
                    % name, 'local'), 'r') as zip:
            for info in zip.infolist():
                if info.filename.endswith('.ttf'):
                    yield (info.filename[:-4], zip.extract(info, cache_path()),
                           'http://www.kreativekorp.com/software/fonts/')
예제 #8
0
def list_fonts():
    u = 'https://pagure.io/liberation-fonts'
    collector = html_link_collector()
    with io.open(acquire(u, 'local'), mode='r', encoding='utf-8') as f:
        for line in f:
            collector.feed(line)
    collector.close()
    for link in collector.links:
        if '-ttf-' in link and link.endswith('.tar.gz'):
            with tarfile.open(acquire(link, 'local'), 'r') as tar:
                for name in tar.getnames():
                    if name.endswith('.ttf'):
                        tar.extract(name, cache_path())
                        path = os.path.join(cache_path(), name)
                        name = name.split('/')[-1][:-4]
                        name = re.sub('([a-z])([A-Z])', '\\1 \\2', name)
                        name = re.sub('-', ' ', name)
                        yield (name, path, u)
            break
예제 #9
0
def list_fonts():
    u = 'http://users.teilar.gr/~g1951d/'
    collector = html_link_collector()
    with io.open(acquire(u, 'local'), mode='r', encoding='utf16') as f:
        for line in f:
            collector.feed(line)
    collector.close()
    for link in collector.links:
        if link.endswith('.zip'):
            with zipfile.ZipFile(acquire(u + link, 'local'), 'r') as zip:
                for info in zip.infolist():
                    if 'hint' not in info.filename and info.filename.endswith(
                            '.ttf'):
                        name = info.filename[:-4].split('/')[-1]
                        yield (name, zip.extract(info, cache_path()), u)
예제 #10
0
def list_fonts():
    for name in ['pr', 'petme']:
        with zipfile.ZipFile(
                acquire(
                    'http://www.kreativekorp.com/swdownload/fonts/retro/%s.zip'
                    % name, 'local'), 'r') as zip:
            for info in zip.infolist():
                if info.filename.endswith('.ttf'):
                    name = info.filename[:-4]
                    name = re.sub('PrintChar', 'Print Char ', name)
                    name = re.sub('PRNumber', 'PR Number ', name)
                    name = re.sub('PetMe', 'Pet Me ', name)
                    name = re.sub('(64|128)(2X|2Y)', '\\1 \\2', name)
                    yield (name.strip(), zip.extract(info, cache_path()),
                           'http://www.kreativekorp.com/software/fonts/')
예제 #11
0
def list_fonts():
    u = 'https://www.kurinto.com/'
    collector = html_link_collector()
    with io.open(acquire(u + 'download.htm', 'local'),
                 mode='r',
                 encoding='utf-8') as f:
        for line in f:
            collector.feed(line)
    collector.close()
    for link in collector.links:
        if link.endswith('_Full.zip'):
            with zipfile.ZipFile(acquire(u + link, 'local'), 'r') as zip:
                for info in zip.infolist():
                    if info.filename.endswith('-Rg.ttf'):
                        name = info.filename[:-7].split('/')[-1]
                        yield (name, zip.extract(info, cache_path()), u)
예제 #12
0
def list_fonts():
    u = 'https://www.google.com/get/noto/'
    collector = html_link_collector()
    with io.open(acquire(u, 'local'), mode='r', encoding='utf-8') as f:
        for line in f:
            collector.feed(line)
    collector.close()
    for link in collector.links:
        if '/Noto-' not in link and link.endswith('.zip'):
            with zipfile.ZipFile(acquire(link, 'local'), 'r') as zip:
                for info in zip.infolist():
                    if info.filename.endswith(
                            '.ttf') or info.filename.endswith('.otf'):
                        name = info.filename[:-4]
                        name = re.sub('([a-z])([A-Z])', '\\1 \\2', name)
                        name = re.sub('-Regular', '', name)
                        name = re.sub('-', ' ', name)
                        yield (name, zip.extract(info, cache_path()), u)
예제 #13
0
def list_fonts():
	u = 'https://dejavu-fonts.github.io/'
	du = 'https://dejavu-fonts.github.io/Download.html'
	collector = html_link_collector()
	with io.open(acquire(du, 'local'), mode='r', encoding='utf-8') as f:
		for line in f:
			collector.feed(line)
	collector.close()
	for link in collector.links:
		bn = link.split('/')[-1]
		if bn.startswith('dejavu-fonts-ttf') and bn.endswith('.zip'):
			with zipfile.ZipFile(acquire(link, 'local', None), 'r') as zip:
				for info in zip.infolist():
					if info.filename.endswith('.ttf'):
						name = info.filename.split('/')[-1][:-4]
						name = re.sub('([a-z])([A-Z])', '\\1 \\2', name)
						name = re.sub('Deja Vu', 'DejaVu', name)
						name = re.sub('-', ' ', name)
						yield (name, zip.extract(info, cache_path()), u)
예제 #14
0
def list_fonts():
	u = 'https://design.ubuntu.com/font/'
	collector = html_link_collector()
	with io.open(acquire(u, 'local', compressed=True), mode='r', encoding='iso-8859-1') as f:
		for line in f:
			collector.feed(line)
	collector.close()
	for link in collector.links:
		if link.endswith('.zip'):
			with zipfile.ZipFile(acquire(link, 'local'), 'r') as zip:
				for info in zip.infolist():
					if '__MACOSX' in info.filename:
						continue
					if info.filename.endswith('.ttf'):
						name = info.filename.split('/')[-1][:-4]
						name = re.sub('([a-z])([A-Z])', '\\1 \\2', name)
						name = re.sub('-', ' ', name)
						yield (name, zip.extract(info, cache_path()), u)
			break
예제 #15
0
def list_fonts():
    bu = 'http://scholarsfonts.net/'
    u = bu + 'cardofnt.html'
    collector = html_link_collector()
    with io.open(acquire(u, 'local'), mode='r', encoding='windows-1252') as f:
        for line in f:
            collector.feed(line)
    collector.close()
    for link in collector.links:
        if link.endswith('.zip'):
            with zipfile.ZipFile(acquire(bu + link, 'local'), 'r') as zip:
                for info in zip.infolist():
                    if info.filename.endswith('.ttf'):
                        name = info.filename[:-4].split('/')[-1]
                        if name.startswith('Cardob'):
                            name = 'Cardo Bold'
                        elif name.startswith('Cardoi'):
                            name = 'Cardo Italic'
                        else:
                            name = 'Cardo'
                        yield (name, zip.extract(info, cache_path()), u)
            break
예제 #16
0
def list_fonts():
    u = 'http://savannah.gnu.org/projects/freefont/'
    du = 'http://ftp.gnu.org/gnu/freefont/'
    collector = html_link_collector()
    with io.open(acquire(du, 'local'), mode='r', encoding='utf-8') as f:
        for line in f:
            collector.feed(line)
    collector.close()
    latestDate = None
    latestLink = None
    for link in collector.links:
        m = re.match('^freefont-[ot]tf-([0-9]+)[.]zip$', link)
        if m is not None:
            if latestDate is None or m.group(1) > latestDate:
                latestDate = m.group(1)
                latestLink = link
    with zipfile.ZipFile(acquire(du + latestLink, 'local'), 'r') as zip:
        for info in zip.infolist():
            if info.filename.endswith('.ttf') or info.filename.endswith(
                    '.otf'):
                name = info.filename.split('/')[-1][:-4]
                name = re.sub('([a-z])([A-Z])', '\\1 \\2', name)
                name = re.sub('Free (Sans|Serif|Mono)', 'Free\\1', name)
                yield (name, zip.extract(info, cache_path()), u)
예제 #17
0
def list_fonts():
	for name in ['magdalena', 'mcmillen', 'mischke', 'monterey']:
		with zipfile.ZipFile(acquire('http://www.kreativekorp.com/swdownload/fonts/relaybm/%s.zip' % name, 'local'), 'r') as zip:
			for info in zip.infolist():
				if info.filename.endswith('.ttf'):
					yield (re.sub('Bold', ' Bold', info.filename[:-4]), zip.extract(info, cache_path()), 'http://www.kreativekorp.com/software/fonts/')