replace deprecated API using CoreText