<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[StreetVoice Lab - Medium]]></title>
        <description><![CDATA[Bring up indie music behind the scene - Medium]]></description>
        <link>https://medium.com/streetvoice-backstage?source=rss----1ad0a7c3a5a1---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>StreetVoice Lab - Medium</title>
            <link>https://medium.com/streetvoice-backstage?source=rss----1ad0a7c3a5a1---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 21:45:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/streetvoice-backstage" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[音樂演出活動行事曆開放訂閱]]></title>
            <link>https://medium.com/streetvoice-backstage/%E9%9F%B3%E6%A8%82%E6%BC%94%E5%87%BA%E6%B4%BB%E5%8B%95%E8%A1%8C%E4%BA%8B%E6%9B%86%E9%96%8B%E6%94%BE%E8%A8%82%E9%96%B1-ee33e9490849?source=rss----1ad0a7c3a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/ee33e9490849</guid>
            <category><![CDATA[streetvoice]]></category>
            <dc:creator><![CDATA[海總理]]></dc:creator>
            <pubDate>Mon, 21 Mar 2022 09:05:35 GMT</pubDate>
            <atom:updated>2022-03-21T09:35:57.590Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="音樂演出活動的 Google Calendar 訂閱畫面" src="https://cdn-images-1.medium.com/max/1024/1*YtPIIOK7G7iAy0atyEqQWg.jpeg" /><figcaption>音樂演出活動的 Google Calendar 訂閱畫面</figcaption></figure><p>由於 <a href="https://streetvoice.com/">StreetVoice 街聲</a>有開放投稿演出活動的功能，讓音樂人或是場館可以自行新增投稿、宣傳演出活動，讓樂迷可以直接透過街聲的 App 接收到演出活動的推播通知。</p><p>但也許有人就是不想要裝街聲的 App，想說就乾脆開放這個行事曆的訂閱功能，讓大家用自己常用的行事曆軟體來訂閱。</p><p>如果你剛好有演出想要宣傳的話，你也可以透過以下網址填寫你的演出活動資訊來通知，需要登入街聲嘿。</p><p><a href="https://streetvoice.com/venue/activities/create/">登入 | StreetVoice 街聲 - 最潮音樂社群</a></p><h3>使用 Google Calendar 訂閱</h3><p>好，重點來啦，使用 Google Calendar 的朋友可以透過以下連結訂閱這個行事曆，據說 iOS 可以直接打開 Google Calendar 的 App 訂閱，Android 的反而不行，這個有點不太對，不過反正你就試試嘛</p><p><a href="https://calendar.google.com/calendar/u/0/r?cid=hga161d0bkf4k6e60t1apod7ifrs16up@import.calendar.google.com">Google Calendar</a></p><p>當然你也可以只訂閱北、中、南的演出活動，是不是很貼心? 下面自己選</p><ul><li><a href="https://calendar.google.com/calendar/u/0/r?cid=5o12l0u76vhqmeq2pjkbftm7r0fvj9ar@import.calendar.google.com">Google Calendar</a></li><li><a href="https://calendar.google.com/calendar/u/0/r?cid=5o12l0u76vhqmeq2pjkbftm7r0fvj9ar@import.calendar.google.com">Google Calendar</a></li><li><a href="https://calendar.google.com/calendar/u/0/r?cid=1gk7vntnbup955lprcobea70626h7oed@import.calendar.google.com">Google Calendar</a></li></ul><h3>非 Google Calendar</h3><p>萬一你平常不是用 Google Calendar 的話（例如 Apple Calendar），也可以直接輸入以下網址，直接在行事曆裡面輸入網址進行訂閱</p><ul><li>全部： <a href="https://streetvoice.com/venue/activities/all/feed.ics">https://streetvoice.com/venue/activities/all/feed.ics</a></li><li>北部： <a href="https://streetvoice.com/venue/activities/north/feed.ics">https://streetvoice.com/venue/activities/north/feed.ics</a></li><li>中部： <a href="https://streetvoice.com/venue/activities/center/feed.ics">https://streetvoice.com/venue/activities/center/feed.ics</a></li><li>南部： <a href="https://streetvoice.com/venue/activities/south/feed.ics">https://streetvoice.com/venue/activities/south/feed.ics</a></li></ul><h3>最後</h3><p>避免你還不知道，其實有裝街聲的 App 的話，當追蹤的音樂人有演出活動的話，你可以直接收到演出活動的推播。</p><p>或是你也可以在 App 裡隨意看看最近有什麼活動，看起來像是截圖這樣，大家參考一下！</p><figure><img alt="StreetVoice 街聲的演出活動資訊畫面" src="https://cdn-images-1.medium.com/max/365/1*7zgrbjR0fuqYfwhHQ1SMkA.jpeg" /></figure><p>還沒裝的，可以點下面這個連結安裝 App</p><p><a href="https://streetvoice.com/pages/mobile-app/">想要聽更多？就在街聲 App 你我一起聽見未來的流行</a></p><p>以上，歡迎留言 Feedback 給建議</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee33e9490849" width="1" height="1" alt=""><hr><p><a href="https://medium.com/streetvoice-backstage/%E9%9F%B3%E6%A8%82%E6%BC%94%E5%87%BA%E6%B4%BB%E5%8B%95%E8%A1%8C%E4%BA%8B%E6%9B%86%E9%96%8B%E6%94%BE%E8%A8%82%E9%96%B1-ee33e9490849">音樂演出活動行事曆開放訂閱</a> was originally published in <a href="https://medium.com/streetvoice-backstage">StreetVoice Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[透過 Zeplin 實現輕便的 Android 文字設計實作]]></title>
            <link>https://medium.com/streetvoice-backstage/%E9%80%8F%E9%81%8E-zeplin-%E5%AF%A6%E7%8F%BE%E8%BC%95%E4%BE%BF%E7%9A%84-android-%E6%96%87%E5%AD%97%E8%A8%AD%E8%A8%88%E5%AF%A6%E4%BD%9C-4f0c80cef2cc?source=rss----1ad0a7c3a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/4f0c80cef2cc</guid>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[zeplin]]></category>
            <category><![CDATA[andorid]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[北棲青年]]></dc:creator>
            <pubDate>Fri, 28 Jun 2019 11:10:08 GMT</pubDate>
            <atom:updated>2019-07-12T15:01:36.740Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2eS6FDc8QsZCIPesi42dRg.png" /></figure><h3>Zeplin 的文字屬性欄位</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*UdWztNPX5Lgexfyej-8LOQ.png" /></figure><p>Zeplin 真的是非常盡責的軟體，只要是任何文字的屬性上傳之後都會全部寫得清清楚楚。但這麼多的欄位同時也代表會造成實作上的繁瑣以及困難，在這樣的環境下，很容易讓文字設計實作時容易來來回回，或許真的有工程師可以完美的照搬，但這畢竟是少數的少數。<br>其實 Zeplin 為了因應這樣的問題，提出了一個不錯的解法，就是給 Android 專案用的 XML 插件。</p><h3>XML 插件（for Zeplin）</h3><p><a href="https://extensions.zeplin.io/zeplin/android-xml">zeplin/XML</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*D9iLoDJ59EuNymBUxXbWnA.png" /><figcaption>裝好插件之後，文字就會自動產出需要的程式碼</figcaption></figure><pre>什麼是 XML？</pre><pre>XML 是一種標籤語言，全名是 <strong>E</strong>xtensible <strong>M</strong>arkup <strong>L</strong>anguage，其中 Markup language 就是指標籤語言。如果不知道什麼是標籤語言的話，可以設想 HTML，因為 HTML 也是一種標籤語言，也就是用來把純文字加上其他各種標籤屬性讓實際呈現時可以有標註、排版等等效果的一種代碼類型。</pre><pre>Android 官方目前有提供兩種建構 UI 的方式，其中一種就是透過 XML，而從<a href="https://developer.android.com/guide/topics/ui/declaring-layout?hl=zh-tw">官方文件</a>看起來，這也是官方更推崇的做法。</pre><pre>也就是說，如果 Android 工程師是使用 XML 來做 UI 的話，他一定有一份用來標註排版、文字樣式的 XML 檔，這份 XML 檔就是我們的目標。只要能產出符合 Text Styles 而且能用的 XML 代碼，設計師的 Text Styles 就能無痛銜接上 Android 工程師。</pre><p>裝了插件之後，文字區塊就會自動產出程式碼了，看起來非常的不錯，不僅是大小。但這樣做每個文字區塊都會寫一長串程式碼，這麼髒的作法沒多久就會被工程師棄用這個作法改用自己習慣的整理方式，所以我們要靠 <a href="https://support.zeplin.io/articles/1504520-organizing-styleguide-text-styles">Zeplin 的 Styleguide 與 Sketch Text Styles 連動</a> 來完成更乾淨的文字設計程式碼。<br>如果還沒有整理自己的 Text Styles 的話，先去整理一份，不然接下來就不能做了，有關 Sketch Text Styles 製作的方法推薦看下面這篇，做出來的 Text Styles 會非常乾淨。</p><p><a href="https://medium.com/sketch-app-sources/text-styles-mastery-with-sketch-52-dc00c7fe1aa6">Text Styles Mastery with Sketch 52</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p5W1dXAGhQU-M0m9BfkrVg.png" /><figcaption>按照上面教學完成後的檔案（Artboard 先不要刪除）</figcaption></figure><p>先提醒一下，如果你是用上面的方法做 Text Styles，那完成之後的 Artboard 千萬不要刪除，因為等等會用上。<br>接下來會一步一步解說要如何做到在 Zeplin 產出 Android 能用的 XML。</p><h3>最終目標</h3><p>Zeplin 的文字設計最終目標，就是建立 Text Styles，然後利用 Text Styles 生成的 XML 檔達到類似 CSS 之於 HTML 的效果。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jjuhgp56GGYJWTvQajSRzQ.png" /><figcaption>Zeplin Styleguide 的 Text Styles</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ZjgQZWPpoyPSAgn_MHyiFg.png" /><figcaption>工程師只要對照“顏色”、“Text Styles” 就可以重現設計時的文字樣式</figcaption></figure><pre>比較一下產出的 XML 前後的差異，處理前的 XML 大概會長這樣...</pre><pre>&lt;TextView<br>  android:layout_width=&quot;wrap_content&quot;<br>  android:layout_height=&quot;wrap_content&quot;<br>  android:textSize=&quot;18sp&quot;<br>  android:textColor=&quot;<a href="http://twitter.com/color/b_1">@color/b_1</a>&quot;<br>  android:lineSpacingExtra=&quot;9sp&quot;<br>  android:gravity=&quot;center_horizontal&quot;<br>  tools:text=&quot;還沒登入會員&quot;<br>/&gt;</pre><pre>然後看看處理後大概會是這樣...</pre><pre>&lt;TextView<br>  style=&quot;<a href="http://twitter.com/style/AndroidHeadingH3CenterBol">@style/AndroidHeadingH3CenterBol</a>d&quot;<br>  android:layout_width=&quot;wrap_content&quot;<br>  android:layout_height=&quot;wrap_content&quot;<br>  tools:text=&quot;還沒登入會員&quot;<br>/&gt;</pre><pre>比起來就輕便了許多</pre><h3>Sketch Text Styles ︎上傳 Zeplin Styleguide</h3><p>以防萬一，先再貼一次有關 Zeplin Styleguide 的操作說明。</p><p><a href="https://support.zeplin.io/articles/1504520-organizing-styleguide-text-styles">Organizing Styleguide text styles</a></p><p>好的，假如一切就緒的話，先來把 Text Styles 上傳到 Zeplin 上。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*W-TqSc3c4grj-uxaaUhobQ.png" /><figcaption>把 Text Styles 上傳到 Zeplin</figcaption></figure><p>但一到 Styleguide 裡面之後，就會發現一場災難……</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YRLQWcehbfUCddKp6363DQ.png" /></figure><p>…不愧是 Zeplin，真的非常盡責，如果把所有 Text Styles 都加進來，Styleguide 大概要炸了。千萬不要手賤去按 “Add All Text Styles”，因為加了之後就只能手動一個一個刪除了。但如果上傳之後會產生這樣的狀況，要怎麼迴避 Zeplin 一次抓這麼多 Text Styles 呢？</p><blockquote><strong>Zeplin 給出的解法：將顏色屬性去除</strong></blockquote><p>還記得前面在 Sketch 製作 Text Styles 時留下的 Artboard 嗎？我們現在要用到它了。</p><ol><li>開一個新的 Sketch 檔案，只取這段一種顏色的 Text Styles，複製到新的 Sketch 檔案裡面</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9MEzgTKM_PryMjaluEdVkQ.png" /><figcaption>取出單一顏色屬性的 Text Styles</figcaption></figure><p>2. 確認一下，新檔案吃到的 Text Styles 只有一種顏色而且樣式沒有重複</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IADgS180CmdSsudzIz0UzA.png" /><figcaption>確認新檔案的 Text Styles</figcaption></figure><p>3. 將 Text Styles 上傳到 Zeplin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CEQ1Fn9_xVvYPER3OoAepQ.png" /><figcaption>上傳 Zeplin 後的 Text Styles</figcaption></figure><p>4. 把 Zeplin 的 Text Style 顏色屬性標籤全部刪除</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GOTUHxFx7D7NnoLEpEXYnA.png" /><figcaption>把 Text Styles 的顏色標籤全部刪除</figcaption></figure><p>5. 重新確認一下 Zeplin 裡文字產生的 XML 有沒有正確吃到 Text Styles，以下面畫面上的標題為例</p><pre>&lt;TextView<br>  style=&quot;<a href="http://twitter.com/style/AndroidHeadingH2Left700">@style/AndroidHeadingH2Left700</a>&quot; //吃到的 Text Styles<br>  android:layout_width=&quot;wrap_content&quot;<br>  android:layout_height=&quot;wrap_content&quot;<br>  tools:text=&quot;summer！夏日之歌&quot;<br>/&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIrIru5iBVB1MhJgkbTeuA.png" /><figcaption>確認一下 Zeplin 裡面文字產出的 XML</figcaption></figure><p>6. 將 Zeplin Styleguide 右側欄位的 XML 就能丟到 Android 專案裡面使用</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v4acbzGH02AcqZS9JCng-w.png" /><figcaption>完工！</figcaption></figure><pre>！！！以下為補充內容！！！</pre><h3>Zeplin 上的 XML 對中文設計的不友善</h3><p>標題寫的是 Zeplin，但實際上應該說是 Android 對中文設計的不友善，所以到底是在不友善什麼呢？<br>下面會慢慢介紹，首先透過 Sketch 的文字屬性面板看同一個樣式的文字在 Zeplin 上的 XML 實際寫了什麼？</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*2P3LA1dewzA1pf8EK6UZww.png" /></figure><pre>&lt;style name=&quot;AndroidHeadingH1CenterBold&quot;&gt; // Text Styles 名稱</pre><pre>&lt;item name=&quot;android:gravity&quot;&gt;center_horizontal&lt;/item&gt; // 置中</pre><pre>&lt;item name=&quot;android:textSize&quot;&gt;36sp&lt;/item&gt; // 大小 36</pre><pre>&lt;item name=&quot;android:lineSpacingExtra&quot;&gt;24sp&lt;/item&gt; // 行高 60(36+24)</pre><pre>&lt;/style&gt;</pre><p>仔細看一下就會發現缺少了一個關鍵的屬性，<strong>字體<br></strong>但 Zeplin 的 XML 真的是原本就缺少字體嗎？其實並沒有</p><blockquote>現實是<br>只要你用中文字設計，XML 就注定缺少字體屬性<br>這個屬性在 XML 裡面是 android:fontFamily</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*358UCFX9qJgBOSBHfN1fCQ.png" /></figure><p>這是怎麼一回事呢？接下來會說明</p><h3>Android 對中文字體支援的限制</h3><p>Android 官方改變字體屬性的是 android:fontFamily ，目前預設支援的字體檔是 Roboto，這是一套英文字體，Android 目前對中文並沒有正式的支援整套字體，只要 Zeplin 發現你的文字有中文，他就會自動將 android:fontFamily 屬性移除，因為在中文設定這個屬性沒有意義，這也衍生出一個麻煩。</p><blockquote>中文設計中 Zeplin 生成的 XML 會永遠缺乏字體字重</blockquote><p>字體也就算了，我相信中文設計圈不會有太多人在 Android APP 裡面灌自己的中文字體檔，因為實在太肥了。<br>但偏偏 UI 設計發展到 2019 年，粗體排版什麼的可是多到數不完。為了解決中文字設計的這個盲點，我們就要透過另一個文字屬性，android:textStyle。</p><h3>Android:textStyle 對中文設計的應用</h3><p>跟 android:fontFamily 不同，android:textStyle 是所有語系都支援的一種屬性，就算不灌字體檔系統也能改變字重，他有三種屬性可以選擇</p><p>・正常=normal<br>・粗體=bold<br>・斜體=italic</p><p>而粗體（Bold）就是我們用來實現粗體排版的手段，同時也代表我們能使用的文字字重只能是 Regular 或 Bold。</p><h3>為 Zeplin 產出的 XML 加上 Android:textStyle</h3><p>我們先回到 Zeplin 上面的已經做好的 Text Style Catalog，把 XML 複製到任何的文字編輯器中，然後把 <strong>所有 </strong>會用到粗體字設計的文字樣式都加上 android:textStyle=&quot;bold&quot; ，這個步驟也可以交給工程師完成就好，因為設計師操作很容易會弄壞。</p><p>以上面的範例示範</p><pre>&lt;&lt;style name=&quot;AndroidHeadingH1CenterBold&quot;&gt; </pre><pre>&lt;item name=&quot;android:gravity&quot;&gt;center_horizontal&lt;/item&gt; </pre><pre>&lt;item name=&quot;android:textSize&quot;&gt;36sp&lt;/item&gt; </pre><pre>&lt;item name=&quot;android:lineSpacingExtra&quot;&gt;24sp&lt;/item&gt; </pre><pre>&lt;/style&gt;</pre><p>加上 android:textStyle=&quot;bold&quot; 的屬性</p><pre>&lt;style name=&quot;AndroidHeadingH1CenterBold&quot;&gt;</pre><pre>&lt;item name=&quot;android:gravity&quot;&gt;center_horizontal&lt;/item&gt;</pre><pre>&lt;item name=&quot;android:textSize&quot;&gt;36sp&lt;/item&gt;</pre><pre>&lt;item name=&quot;android:textStyle&quot;&gt;bold&lt;/item&gt;</pre><pre>&lt;item name=&quot;android:lineSpacingExtra&quot;&gt;24sp&lt;/item&gt;</pre><pre>&lt;/style&gt;</pre><p>最後附上完工後的工作文件，部分連結是內部使用所以無法開啟，有需要的話可以參考</p><p><a href="https://www.notion.so/Android-Zeplin-Styleguide-XML-a8c6ac7b1b26436db50e5a1d5cdad7ac">[Android] Zeplin Styleguide 中的 XML 使用方法</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f0c80cef2cc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/streetvoice-backstage/%E9%80%8F%E9%81%8E-zeplin-%E5%AF%A6%E7%8F%BE%E8%BC%95%E4%BE%BF%E7%9A%84-android-%E6%96%87%E5%AD%97%E8%A8%AD%E8%A8%88%E5%AF%A6%E4%BD%9C-4f0c80cef2cc">透過 Zeplin 實現輕便的 Android 文字設計實作</a> was originally published in <a href="https://medium.com/streetvoice-backstage">StreetVoice Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[設計師自己就能做的 Sketch 檔案優化：長期維護檔案效能]]></title>
            <link>https://medium.com/streetvoice-backstage/%E8%A8%AD%E8%A8%88%E5%B8%AB%E8%87%AA%E5%B7%B1%E5%B0%B1%E8%83%BD%E5%81%9A%E7%9A%84-sketch-%E6%AA%94%E6%A1%88%E5%84%AA%E5%8C%96-%E9%95%B7%E6%9C%9F%E7%B6%AD%E8%AD%B7%E6%AA%94%E6%A1%88%E6%95%88%E8%83%BD-8dffe346b654?source=rss----1ad0a7c3a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/8dffe346b654</guid>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[sketch]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[設計]]></category>
            <dc:creator><![CDATA[北棲青年]]></dc:creator>
            <pubDate>Fri, 29 Mar 2019 12:15:14 GMT</pubDate>
            <atom:updated>2019-10-06T08:27:46.537Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*PLmtaufLN90U1qBf8ZKk1A.png" /></figure><p>工作就是要一邊聽歌</p><p><a href="https://streetvoice.com/svmusic/playlists/273382/">排行榜上聽不到，你真的要錯過？</a></p><p>先來前情提要，雖然 Sketch 一直以來都以效能作為主打的優勢，但如果是長期在不斷更新的專案，檔案本身越來越肥、越來越慢也是難免。但只要能理解究竟是什麼原因拖慢效能，就可以馬上處理並且避免再讓檔案狀況變得更差。這篇文章主要寫給要長期維護 Sketch 檔，而且擔心檔案越做越大的人。</p><p>在上一篇 <a href="https://medium.com/streetvoice-backstage/%E8%A8%AD%E8%A8%88%E5%B8%AB%E8%87%AA%E5%B7%B1%E5%B0%B1%E8%83%BD%E5%81%9A%E7%9A%84-sketch-%E6%AA%94%E6%A1%88%E5%84%AA%E5%8C%96-%E6%A5%B5%E9%99%90%E7%9A%84%E6%AA%94%E6%A1%88%E5%A3%93%E7%B8%AE-de88f4e962d7"><strong>極限的檔案壓縮</strong></a> 中有提到，真正拖讓 Sketch 檔案肥大的兇手其實是 <strong>圖檔。</strong>但其實就連工作時的效能也是，因為肥大的圖檔同時也代表增加 Render 的壓力，所以這篇會介紹維護 Sketch 檔案效能的手法，重點也大多都會圍繞在圖檔的控管上。</p><h3>1. 如果要刪除任何圖檔，優先考慮還原檔案到沒有圖檔的工作階段，不要直接刪除圖檔</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*NkZaurDqgcRSOQJ4u8OxxQ.png" /></figure><p>平常設計時如果導入了圖檔又不滿意，請不要刪除，利用 <strong>Undo(Command + Z)</strong>來回到導入圖檔前的工作階段。</p><p>這點跟 Sketch 運作的機制有關，只要你將圖片丟進 Sketch 中，儲存時圖片就會被包進檔案內，而又因為 Sketch 本身會有版本紀錄跟 Cache，就算在設計上把圖檔刪除了，一個不小心就會把已經廢棄的圖檔包進檔案內。所以要避免這種狀況，請善用 <strong>Undo</strong>。</p><h3>2. 在導入任何圖檔之前，先進行壓縮</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*nwg3l9hUxTZxnYcFkMwLtw.png" /></figure><p>這裏可以完全參考 <a href="https://medium.com/streetvoice-backstage/%E8%A8%AD%E8%A8%88%E5%B8%AB%E8%87%AA%E5%B7%B1%E5%B0%B1%E8%83%BD%E5%81%9A%E7%9A%84-sketch-%E6%AA%94%E6%A1%88%E5%84%AA%E5%8C%96-%E6%A5%B5%E9%99%90%E7%9A%84%E6%AA%94%E6%A1%88%E5%A3%93%E7%B8%AE-de88f4e962d7"><strong>極限的檔案壓縮</strong></a> 的做法，這裏就只附上需要的工具跟用途。只要能將事前壓縮的習慣導入工作流程中，就不用花更多精力回頭整理 Sketch 檔。</p><ul><li><a href="http://www5.wind.ne.jp/miko/mac_soft/th-maker_x/index-en.html">Th-MakerX</a></li><li><a href="http://nukesaq88.github.io/Pngyu/">Pngyu</a></li><li><a href="https://imageoptim.com/mac">ImageOptim - better Save for Web</a></li></ul><h3>3. 作為素材，同一個圖檔盡量重複利用</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*260P1CUzHeKZQTb-IO1kbw.png" /></figure><p>在一些需要大量圖檔素材的場合（比如列表），盡量重複使用圖檔。或是更加基進一點，只要是同個 Sketch 檔內需要圖檔素材的地方，除非必要盡量都用同一個圖檔素材，沒有導入就沒有傷害。</p><p><strong>但遇到不得已像是 Mockup 的場合，就另外開一個暫時的 Sketch 檔</strong>，完工之後這個檔案就直接廢棄了。</p><h3>4. 不要使用 Sketch Data 來導入圖檔（暫時）</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*SWeldo--VTPD0mqHfTTZ7Q.png" /></figure><p>Sketch 在 50 版開始加入了 Data 的功能，雖然這個功能非常方便，但導入的圖檔都會被包進 Sketch 檔裡面，尤其是隨機導入的功能如果不克制一點，Sketch 檔很快就會被塞爆，手癢的話請克制一點。</p><p>所以現階段並不推薦使用 Sketch Data 的功能來導入圖檔，除非 Sketch 官方有對這個弊病進行修正。</p><h3>結尾的提醒：圖檔只是最有感的部分，但不是全部</h3><p>雖然說管好圖檔對效能的影響是 Sketch 的重點項目，但像是 Symbol、Prototype…之類的功能，隨著專案越做越大，同樣也會影響到效能。</p><p>跟設計長久下來一定會有設計債一樣，這些問題也會隨著專案越做越大影響越來越嚴重，老實說……這些問題目前還沒找到有效的解法可以導入工作流程中😩</p><p>或許現階段最有效的方式就只能重構吧，出來混的終究還是要還啊。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8dffe346b654" width="1" height="1" alt=""><hr><p><a href="https://medium.com/streetvoice-backstage/%E8%A8%AD%E8%A8%88%E5%B8%AB%E8%87%AA%E5%B7%B1%E5%B0%B1%E8%83%BD%E5%81%9A%E7%9A%84-sketch-%E6%AA%94%E6%A1%88%E5%84%AA%E5%8C%96-%E9%95%B7%E6%9C%9F%E7%B6%AD%E8%AD%B7%E6%AA%94%E6%A1%88%E6%95%88%E8%83%BD-8dffe346b654">設計師自己就能做的 Sketch 檔案優化：長期維護檔案效能</a> was originally published in <a href="https://medium.com/streetvoice-backstage">StreetVoice Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[設計師自己就能做的 Sketch 檔案優化：極限的檔案壓縮]]></title>
            <link>https://medium.com/streetvoice-backstage/%E8%A8%AD%E8%A8%88%E5%B8%AB%E8%87%AA%E5%B7%B1%E5%B0%B1%E8%83%BD%E5%81%9A%E7%9A%84-sketch-%E6%AA%94%E6%A1%88%E5%84%AA%E5%8C%96-%E6%A5%B5%E9%99%90%E7%9A%84%E6%AA%94%E6%A1%88%E5%A3%93%E7%B8%AE-de88f4e962d7?source=rss----1ad0a7c3a5a1---4</link>
            <guid isPermaLink="false">https://medium.com/p/de88f4e962d7</guid>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[sketch]]></category>
            <category><![CDATA[ui-design]]></category>
            <dc:creator><![CDATA[北棲青年]]></dc:creator>
            <pubDate>Sun, 17 Feb 2019 15:45:34 GMT</pubDate>
            <atom:updated>2019-02-17T15:45:33.920Z</atom:updated>
            <content:encoded><![CDATA[<h4>利用壓縮內部圖檔將 Sketch 檔壓縮到最小</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cUJWuud8CDHycaMdkUbV6Q.png" /></figure><p>工作時就是要一邊聽歌才行</p><p><a href="https://streetvoice.com/svmusic/playlists/428837/">【新民謠】唱著你的故事，還有一生沒寫完</a></p><p>雖然 Sketch 一直以來都以效能作為主打的優勢，但如果是長期在不斷更新的專案，檔案本身越來越肥、越來越慢也是難免。但只要能理解究竟是什麼原因拖慢效能，就可以馬上處理並且避免再讓檔案狀況變得更差。這篇文章主要寫給以下這幾個狀況的人。</p><ol><li>要長期維護 Sketch 檔，而且檔案越做越大</li><li>手邊 Sketch 檔案狀態已經很差，每次開啟、編輯都是折磨</li><li>Mac 太舊每次開 Sketch 都會覺得卡的人</li></ol><p>計畫會分成兩篇文章來介紹</p><ol><li><strong>極限的檔案壓縮</strong>：利用壓縮內部圖檔立即改善檔案狀況，這篇會先介紹</li><li><strong>長期維護檔案效能</strong>：長期維護檔案的方式，之後會介紹</li></ol><h3>用壓縮圖檔來達到檔案最小化</h3><p>先來說明白一件事情，究竟 Sketch 檔案肥大的原因是什麼？實際上 Sketch 檔本身是非常輕便的，真正讓檔案肥大的其實是 <strong>圖檔</strong>，所以要立即優化檔案就要從檔案內的圖檔下手，下面會一步一步教學要如何操作，作法主要參考以下這篇文章，實際操作前建議先備份檔案。</p><p><a href="https://medium.com/sketch-app-sources/minimize-sketch-files-to-a-minimum-with-6-simple-steps-and-awesome-tools-3e525a56f2e4">Minimize Sketch files to a MINIMUM! with 6 simple steps and awesome tools</a></p><h4>1. 使用 BetterZip 提取 Sketch 檔內的圖檔</h4><p><a href="https://macitbetter.com/">BetterZip 4 - MacItBetter</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*l9UyUmYh279vnM9rZJ7lVA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FPIAcBEwwvUEY6Cu_Q5rWA.png" /><figcaption>即將要壓縮的檔案，目前的檔案大小 101.8 MB，在 Betterzip 中開啟可以看到 “image” 資料夾大小就達到 98.7 MB</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*oX5L9m1SN9TDs-qGiI2Y2w.gif" /><figcaption>打開 “image” 資料夾，就會找到 Sketch 檔裡所有用到的圖檔</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*AQHREtbxFNLmXOAUmwS7wg.gif" /><figcaption>開一個空白資料夾，將所有圖片複製出來，完成之後，我們就有這個 Sketch 檔內所有的圖檔了，接下來要對複製出來的圖檔做處理</figcaption></figure><h4>2. 用 Th-MakerX 限制圖片寬高</h4><p><a href="http://www5.wind.ne.jp/miko/mac_soft/th-maker_x/index-en.html">Th-MakerX</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*zfbKyJHZLMN8HteAh9ezAw.gif" /><figcaption>開啟 Th-MakerX 設定自己設計尺寸理想的最大寬度（或高度），將所有圖片一次處理。Th-MakerX 會自動忽視比設定更小的檔案，不用手動過濾。</figcaption></figure><p>這個案例中由於是使用為 iOS 設計的檔案，圖片寬度個人是設定在寬度 750px(2x retina 會需要的最大尺寸，3x 圖檔大小會太大視覺效果提升也有限)，這部分視個人需求調整。</p><h4>3. 透過 Pngyu、ImageOtim 做有損壓縮及無損壓縮</h4><ul><li><a href="http://nukesaq88.github.io/Pngyu/">Pngyu</a></li><li><a href="https://imageoptim.com/mac">ImageOptim - better Save for Web</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*f6tY8mXKTSB_JTBhorRCDQ.gif" /><figcaption>將圖片丟進 Pngyu，如果有裝 ImageOptim 會跳出使否要透過 ImageOtim 再次壓縮的選項，選 “Yes”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*nG2U_wHXqDrdKkMwQPOYYg.gif" /><figcaption>Magic happening……</figcaption></figure><h4>4.將圖檔放回 Betterzip 開啟的 Sketch 檔</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*8JjQNLKt-KmvfqSzQNUIkg.gif" /><figcaption>將壓縮好的圖檔丟回 Betterzip 開啟的 Sketch 檔，取代原始圖檔</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*soFQHxT9xQIYgnsQa-d3qg.png" /><figcaption>記得要儲存 Sketch 檔，跳出 “This archive doesn’t contain any Mac specific files yet” 的選項時要選 “Keep Mac Stuff out”</figcaption></figure><p>到這邊為止，圖檔處理的步驟就算完成了，記得打開 Sketch 檔看看是否正常</p><h3>壓縮圖檔的影響</h3><p>如果順利的話，Sketch 檔案的大小都能縮減到一半一上。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*l9UyUmYh279vnM9rZJ7lVA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*5dx6RNXJB6qQTyDL4mZkMA.png" /><figcaption>左為原檔，右為已壓縮檔案，101.8MB -&gt; 31 MB</figcaption></figure><p>文中的檔案大小壓縮到不到 1/3 ，以壓縮檔案來說已經很驚人了，不過節省空間並不是最有感的，而是檔案內的圖檔都被壓縮之後，在 Sketch 內工作時也不在需要載入過大的圖片，工作效能會有非常明顯的影響。</p><p>然後來說說這個做法的優缺點</p><p><strong>優點</strong></p><ol><li>不需要更動設計，任何 Sketch 檔都可以處理</li><li>效能差異非常明顯而且立即見效，對越肥大的檔案效果越好</li><li>技術門檻低</li></ol><p><strong>缺點</strong></p><ol><li>通常一個檔案只能做一次，同一個圖檔做兩次有損壓縮通常會被壓壞</li><li>因為第一點的關係，不能作為長期的做法，只算是補救方案</li><li>有損壓縮畢竟會影響圖片本身，對於不同的設計需求可能行不通</li></ol><p>壓縮圖檔的作法效果看似效果很好，但畢竟不可能天天把 Sketch 檔內的圖檔抓出來壓縮，所以只是從頭優化整個工作流程的第一步，之後檔案還要維護才能維持良好的效能，詳細的作法會寫在 <strong>長期維護檔案效能 </strong>中。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de88f4e962d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/streetvoice-backstage/%E8%A8%AD%E8%A8%88%E5%B8%AB%E8%87%AA%E5%B7%B1%E5%B0%B1%E8%83%BD%E5%81%9A%E7%9A%84-sketch-%E6%AA%94%E6%A1%88%E5%84%AA%E5%8C%96-%E6%A5%B5%E9%99%90%E7%9A%84%E6%AA%94%E6%A1%88%E5%A3%93%E7%B8%AE-de88f4e962d7">設計師自己就能做的 Sketch 檔案優化：極限的檔案壓縮</a> was originally published in <a href="https://medium.com/streetvoice-backstage">StreetVoice Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>