Put unit tests next to tested Swift code, and run tests from the same Xcode target.…
CoreText Swift Academy - part 3
In Part 2 [https://blog.krzyzanowskim.com/2020/07/10/coretext-swift-academy-part-2/], I discussed selected font metrics. Now let's see how to layout text line or lines. Text Layout Text layout is non-trivial task. CoreText provides handful of useful functions to layout text in a rectangle frame, or along…
CoreText Swift Academy - part 2
In Part 1 [https://blog.krzyzanowskim.com/2020/07/09/coretext-academy-part-1/], I created a label view, where I draw a text in it. Now let's see what happened there: Font & Attibuted String How about font? Font is important part of drawing text. CoreText relies on Attributed String.…
CoreText Swift Academy - part 1
Ever wanted to layout letters? implement label view? create text edit component from the ground? bear with me. CoreText is low-level framework for laying out text and handling fonts. Low level like "C language level low", but also like "Font glyph level low". What CoreText can:…
Use consumer rights to refund for faulty MacBook - diary
In February 2020, a keyboard in my MacBook Pro 15.4-inch [https://www.apple.com/shop/refurbished/mac/2018-15-inch] (model 2018) has broken down. I noticed typical repeating keys. Nothing new for the MacBook with the butterfly keyboard. I also noticed I have screen scratch (that I connect with staingate…