<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>macneko-ayu</author_name>
  <author_url>https://blog.hatena.ne.jp/macneko-ayu/</author_url>
  <blog_title>ごんれのラボ</blog_title>
  <blog_url>https://blog.macneko.com/</blog_url>
  <categories>
    <anon>Swift</anon>
    <anon>UIBezierPath</anon>
  </categories>
  <description>概要 Swiftで文字列の輪郭に線をつける という記事を書いたんだけど、仕上がりに納得がいかなかったので別のアプローチで実現してみた。 ゴール Illustratorのアピアランス機能で作って画像化したものと近い感じにする。 問題点 NSAttributedString の attributes で直接線をつけていたため、線の太さに応じて塗りの範囲が狭くなってしまった 文字が角ばり、丸くできない 実現方法 文字を UIBezierPath に変換して描画するようにした。 実装は 【iOS】テキストの輪郭パスを取得する を参考にさせていただき、Swiftに書き直した。 あわせて TextOutl…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.macneko.com%2Fentry%2Fapply-outline-to-string&quot; title=&quot;Swiftで文字列の輪郭に線をつける（UIBezierPath版） - ごんれのラボ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://user-images.githubusercontent.com/5406126/53006951-a676c700-3479-11e9-8c4a-6ef9eabab0cb.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-02-20 08:00:00</published>
  <title>Swiftで文字列の輪郭に線をつける（UIBezierPath版）</title>
  <type>rich</type>
  <url>https://blog.macneko.com/entry/apply-outline-to-string</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
