Advertisements

LibreOffice 5.3+ vs. Adobe Type 1 Fonts

LibreOffice from 5.3 onward (Xubuntu 18.04 uses LO 6.0) no longer supports Adobe Type 1 fonts, which comes as a surprise to those of us who actually bought fonts, back in the day, and have been using them ever since. Apparently, Windows dropped Type 1 font support some time ago.

Based on some hints, I set up the Adobe Font Development Kit for OpenType. It’s a Python thing, preferably running in a virtual environment to avoid screwing up the rest of one’s system with bizarre dependencies. It seems one (“I”) must not update pip using pip after installing python-pip using apt-get; recovering from that mess was good for another hour of flailing.

The default AFDKO installation spat out an error message about ufolib (I am not making this up) being at 2.1.1, instead of the required 2.3.1. In for a penny, in for a pound, I updated ADFKO with the “prerelease” option:

pip install -U afdko --pre

Which fetched ufolib 2.3.1, apparently from wherever Python keeps its prerelease stash. I have NFC what’s going on with any of this.

An Adobe blog post on the AFDKO tx tool suggested it can convert Type 1 fonts to CFF (a.k.a. Adobe Type 2) fonts and some poking around suggested CFF also figures in OTF fonts.

tx -cff -n -N -A awb_____.pfb
--- Filename: awb_____.pfb
--- FontName: ACaslon-Bold
tx: --- awb_____.pfb
tx: (cfw) unhinted
tx: (cfw) unhinted
tx: (cfw) unhinted
tx: (cfw) unhinted
tx: (cfw) unhinted
tx: (cfw) There are 222 additional reports of 'unhinted'.

The -A option replaces the bizarre Adobe 8.3 file names with actual font information:

awrg____.pfb ⇒ ACaslon-Bold.cff
awbi____.pfb ⇒ ACaslon-BoldItalic.cff
awi_____.pfb ⇒ ACaslon-Italic.cff
awrg____.pfb ⇒ ACaslon-Regular.cff
awsb____.pfb ⇒ ACaslon-Semibold.cff
awsbi___.pfb ⇒ ACaslon-SemiboldItalic.cff

Regrettably, CFF files don’t actually work as fonts, at least as far as LibreOffice 6.0 (or whatever it uses as a font engine) is concerned.

Although it’s possible to convert fonts locally with fontforge, doing it one-by-one is tedious and the learning curve for its Python scripting feature seems rather steep. I fired the most vital fonts at Convertio, an online converter running fontforge in the background, got a matching pile of OTF fonts, and installed them in /usr/share/fonts/custom/type1 to indicate their heritage.

Whereupon LO rammed into a problem I’d had before. The solution this time required sorting the various Caslon and American Typewriter fonts into different “font families” and forcing the TTF names to match their new families. The difference between Medium and Regular seems to have Gone Away.

I should just use Comic Sans and be done with it …

Advertisements

11 Comments

SANE Scanner vs. Xubuntu 18.04

I recently bumped the desktop PC with the scanner from an old Mint to Xubuntu 18.04, which killed a day with all the system and UI tweakage.

The old guides for setting up a networked SANE scanner became inoperative with systemd ruling the configurations, so, after some flailing around, I found a newer guide referencing a guide for USB scanners and pointing to a deeper guide for network sharing in the age of systemd.

The USB guide points out the existence of Access Control Lists for the various device files, which I didn’t know was a thing. AFAICT, you must still be in the scanner group for remote access to happen.

I lost track of the changes during all the flailing around, but it definitely didn’t Just Work.

I’m sure all this will change before I must do it again.

3 Comments

Fireball Island Figures

A cousin asked if my 3D printer could replace some figures gone missing from their old Fireball Island game board, a classic apparently coming out in a new & improved version.

Fortunately, solid models exist on Thingiverse:

Fireball Island figure - Thingiverse 536867

Fireball Island figure – Thingiverse 536867

Unfortunately, the left arm requires support, which Slic3r supplies with great exuberance:

Fireball Island figure - Slic3r support

Fireball Island figure – Slic3r support

The vast tower on the figure’s right side (our left) seemed completely unnecessary, not to mention I have no enthusiasm for the peril inherent in chopping away so much plastic, so I replaced it with a simple in-model pillar:

Figure Support Mods

Figure Support Mods

The pillar leans from an adhesion-enhancing lily pad and ends one layer below the left hand, with all dimensions and angles chosen on the fly to make the answer come out right.

Works like a champ:

Fireball Island Figures - orange - on platform

Fireball Island Figures – orange – on platform

The dark band down the middle comes from the Pixel’s shutter.

They emerged with some PETG hair, the removal of which I left as an end-user experience.

I mailed a small box containing figures printed in my (limited!) palette of four colors, some spares Just In Case™, and a few QC rejects showing the necessity of lily pads.

Game on!

The OpenSCAD source code as a GitHub Gist:

,

Leave a comment

Streaming Radio Player: I2C Display

Although I2C on the Raspberry Pi fails with devices using clock stretching, cheap I2C OLED displays seem to work well enough to not generate any problems search-able with the obvious keywords:

RPi I2C OLED

RPi I2C OLED

Given a picture of the header pinout, the wiring is trivially easy:

RPi I2C OLED - RPi header detail

RPi I2C OLED – RPi header detail

Using yellow for the ground hurts a bit, but that’s what I get for peeling the SPI cable down to four wires. The pin directly adjacent to the green wire is also ground, should that be easier to reach.

Tweaking the Luma driver to use I2C doesn’t require much:

#from luma.core.interface.serial import spi
from luma.core.interface.serial import i2c

... snippage ...

# reduce SPI bus from default 8 MHz to (maybe) avoid OLED failure-to-start
#serial = spi(device=0,port=0,bus_speed_hz=1000000)

# use I2C bus to avoid SPI timing spec failure
serial = i2c(port=1,address=(0x78 >> 1))     # PCB label = 0x78, low bit = R/W

The OLED PCB lists the I2C address with the R/W bit

And then It Just Works, with one gotcha. Although the Python program shuts itself and the system down, the wall wart continues to supply power and, because the I2C bus doesn’t include a Reset line, the OLED display doesn’t know the RPi has gone away. So you must issue a command to turn it off before shutting down:

device.cleanup()        # ideally, switches to low-power mode
rc = subp.call(['sudo','shutdown','-P','now'])

Now, to discover what works … oddly … with these displays.

,

3 Comments

Excavator Family

We’re accustomed to seeing geese with goslings and turkeys with chicks around this time of year, but we didn’t realize excavators have a similar breeding season (clicky for more dots):

Excavator Family - Vassar College

Excavator Family – Vassar College

The adult seems very protective …

Spotted on the Vassar College campus, in front of the dining hall.

2 Comments

Vulture Liftoff

A yummy  carcass on New Hackensack Rd near Wappinger Falls attracted a pair of vultures, one barely visible on the right just beyond Mary (clicky for more dots):

Vultures - New Hackensack Rd - 2018-08-27 - 0159

Vultures – New Hackensack Rd – 2018-08-27 – 0159

Half a second later, they’re both airborne and flapping in unison:

Vultures - New Hackensack Rd - 2018-08-27 - 0190

Vultures – New Hackensack Rd – 2018-08-27 – 0190

The one on the left swooped around the bushes and we both anticipated a collision, but it decided against returning to the carcass until we passed.

Bon appétit!

Leave a comment

Tektronix AM503 Current Probe Amplifier: Failed Electrolytic Capacitor

The same Tektronix AM503 current probe amp with the slightly disconnected JFET developed a nasty 120 Hz hum, which can mean only one thing:

Tek AM503 - corroded capacitor

Tek AM503 – corroded capacitor

Dunno how I missed that while I had the cover off, but there it is. For future reference it’s C165, 47 µF 50 V, with an 8709 date code.

This being a PCB made back in the old days, likely with self-adhesive tape strips, the component pads inside ground and power pours lack thermal isolation decorations.

The solder joints on the bottom side looks better than these, honest:

Tek AM503 - replaced capacitor

Tek AM503 – replaced capacitor

The new cap is 56 µF 50 F, which seems Close Enough.

The other caps have reasonable ESRs, but I must lay in a stock of high-voltage ‘lytics, as the “new” one is definitely old enough to know better, too.

Now that I check, the amp still produces a very low amplitude 2 MHz sine wave on its 1 mA/div and 2 mA/div settings, suggesting Something Is Not Right™ in the front end, but it works well enough to let me defer that fix until later.

 

Leave a comment