Error-free conversion of OTF fonts to WOFF format
I need to convert some OTF fonts to WOFF format for web use, but I'd like to avoid display errors for the converted fonts.
Is there a process to ensure my resulted WOFFs are OK? Are web converters like cloudconvert or convertio reliable in producing error-free conversions?
do you know?
how many words do you know
See also questions close to this topic
-
tkinter tab width incorrect
When creating text on a canvas using the
create_text
method the width of a tab is not what it should be, as indicated byfont.measure
.import tkinter as tk from tkinter.font import Font root = tk.Tk() canvas = tk.Canvas(root, width=300, height=300) canvas.pack() font = Font(family='Arial', size=12) s1 = "a\tb" s2 = "a c" print("Width:", s1, font.measure(s1)) # Width: a b 30 print("Width:", s2, font.measure(s2)) # Width: a c 33 canvas.create_text(10, 10, text=s1, font=font, anchor="nw") canvas.create_text(10, 50, text=s2, font=font, anchor="nw") root.mainloop()
The results of
font.measure
suggest that the line with spaces should be a little longer, but what it displays is:Showing that the width of the tab is significantly larger than the spaces. Using different fonts will result in differently sized tabs, but still inaccurate measurements. The measured width of the text without tabs is correct.
How can I get the correct tab width? Is this a bug?
-
Python 3.10.2 anti-aliased fonts not smoothing in Tkinter under SUSI Linux
I have a problem with font smoothing AKA anti-aliasing not working. I have provided a small Tkinter test code snippet that shows a grid of Tkinter labels that steps through all of the installed fonts using that font's type face below. When run the code under our current build of Python 3.10.2 Tkinter 8.6 running under SUSI Linux. I get a grid of font names but they are clearly not using anti-aliasing. Very jagged.
When I run the same code on my Mac the fonts are smooth as expected. I now believe that this is due to an installation problem for either Python itself and/or Tkinter. I have spent a lot of time searching the Net for any information regarding installation settings/flags for Python 3.10.2 installation that would turn on anti-aliasing because it is clearly not operating under our Linux build. Unfortunately I have to figure out the problem and guide my IT group on how to fix the build because I do not control the installations.
Any ideas/trick and/or where to look for answers for this problem would be greatly appreciated. FWIW anti-aliasing works for our Python 3.6.0 build under the same Linux environment so there is something specifically wrong with the 3.10.2 build and/or the Tkinter installation for same.
Note all of the existing Stack Overflow postings that come up on this topic address using anti-aliased fonts not how to get the feature to fundamentally work. Even though I don't think my code snippet is needed I've included below just in case.
import tkinter from tkinter import font root = tkinter.Tk() root.geometry('1500x1500') root.columnconfigure(0, minsize=25) root.columnconfigure(1, minsize=70) tkinter.Label(root, text='Lists:', anchor=tkinter.W).grid(row=0, column=0, sticky=tkinter.W) fams = font.families(root) for i in range(39): root.rowconfigure(i, minsize=14) col = 0 row = 1 for i, fam in enumerate(fams): label_id = tkinter.Label(root, anchor=tkinter.W, text=f'Sector {i}') print(f'({i}: {row}, {col})') label_id.grid(row=row, column=col ) label_name = tkinter.Label(root, anchor=tkinter.W, font=(fam, 14), text=fam) c2 = col + 1 print(f'({i}: {row}, {c2}) FAM: {fam}') label_name.grid(row=row, column=c2) row += 1 if row % 40 == 0: row = 1 col += 2 root.mainloop()
-
What are XTRA, YOPQ, YTLC, etc. in CSS?
I'm reading a blog on Roboto Flex font which is a variable font, and I see mentions of
- Parametric Counter Width (XTRA in CSS)
- Parametric Thin Stroke (YOPQ in CSS)
- Parametric Lowercase Height (YTLC in CSS)
etc.
What are XTRA, YOPQ, YTL, etc. in CSS? What do they stand for? I have never seen these properties before.
Thanks!
-
How to split a font file to multiple parts?
How to split a font file to multiple parts automatically?
Why do I need this? Because as up to Chrome 99, it limits maximum uncompressed file size of a font to 30 MB. See https://chromium.googlesource.com/external/ots/+/v6.1.1/src/ots.cc
Additionally, Chinese fonts often excceed 30 MB per file. For example, CNS11643 fonts: https://data.gov.tw/dataset/5961
Thus, I need an automation tool to split a font file.
-
How can I modify (add or delete some svg icons) on a .woff or .ttf file?
I'm working on an app that I haven't coded. This app is using customs icons from an .woff file (or .ttf). I have never used this type of file before. I reach to open it with https://fontdrop.info/ and I can see the elements on the file. But I have to add some new icons. How can I do that? I think that I have to :
- Create the new icon with a software (like fontforge?).
- Edit my .woff file to add my new icon.
Do you know some softwares like fontforge? Which one is the easiest to use? How can I modify my current file with the new icon?
Thanks for your answers!