Copied FFI from  https://github.com/bpieber/Cuis-StyledTextEditor/blob/master/FFI.pck