Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOS のテキストレイアウトがむずかしい話

iOS のテキストレイアウトがむずかしい話

Mobile Act NAGOYA #3 の LT 資料
https://mobileactnagoya.connpass.com/event/44624/

Tomoki Kobayashi

December 02, 2016
Tweet

More Decks by Tomoki Kobayashi

Other Decks in Programming

Transcript

  1. ԤจϑΥϯτϝτϦΫε Type abc xAscender Cap Base Mean Descender Base Line

    ͢΂ͯͷจࣈͷج४ͱͳΔઢ Mean Line খจࣈͷߴ͞ͷج४ͱͳΔઢ Cap Line େจࣈͷߴ͞ͷج४ͱͳΔઢ Ascender Line খจࣈͷC΍IͳͲ͕࣋ͭΞηϯμʔͱݺ͹ΕΔ ਨ௚ͳઢͷ্෦ͷج४ͱͳΔઢ Descender Line খจࣈͷQͳͲ͕࣋ͭσΟηϯμʔͱݺ͹ΕΔ ਨ௚ͳઢͷԼ෦ͷج४ͱͳΔઢ ෳ਺ͷج४ઢͰߏ੒͞ΕΔ
  2. ԤจϑΥϯτϝτϦΫε .lineHeight ςΩετ̍ߦͷߴ͞ .xHeight #BTFϥΠϯ͔Β.FBOϥΠϯ·Ͱͷߴ͞ .capHeight #BTFϥΠϯ͔Β$BQϥΠϯ·Ͱͷߴ͞ .ascender #BTFϥΠϯ͔Βτοϓ΁ͷΦϑηοτ .descender

    #BTFϥΠϯ͔ΒϘτϜ΁ͷΦϑηοτ ෛ஋ 6*'POUͷϓϩύςΟͰ೺ѲͰ͖Δ Type abc x .lineHeight .ascender .descender .capHeight .xHeight