<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="255119" data-post-id="255119">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="KungPaoChicken" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  KungPaoChicken
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I suspect it won’t be that straightforward, awesome library btw!<br>
I tried to find out the length if I had to put all the ranges in CSS, and it is arguably okay (especially with gzip/brotli) if the script isn’t <code>common</code> or <code>arabic</code>.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[
  common: 2363,
  arabic: 781,
  ethiopic: 474,
  latin: 471,
  greek: 450,
  inherited: 385,
  han: 276,
  grantha: 223,
  tamil: 204,
  hangul: 180,
  katakana: 179,
  ...
]
</code></pre>
<blockquote>
<p>So mapping a language code to the right scripts to the right code points is not a trivial exercise.</p>
</blockquote>
<p>Indeed. However, unless OP is creating their own font subsets, it is not necessary to check the relationship between scripts and codepoints (Noto variants did that for us), and the list of glyphs available in each font file can be used instead to generate the list of codepoint ranges, which I imagine could be automated with a FontForge script. Then I remembered where I first see this CSS attribute: Google Fonts. The CSS files they provide already have codepoint ranges for the fonts they offer:</p>
<ul>
<li>Noto Sans JP: <a href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP&amp;display=swap" rel="noopener nofollow ugc">https://fonts.googleapis.com/css2?family=Noto+Sans+JP&amp;display=swap</a></li>
<li>Noto Sans Arabic: <a href="https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic&amp;display=swap" rel="noopener nofollow ugc">https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic&amp;display=swap</a></li>
<li>Noto Sans HK: <a href="https://fonts.googleapis.com/css2?family=Noto+Sans+HK&amp;display=swap" rel="noopener nofollow ugc">https://fonts.googleapis.com/css2?family=Noto+Sans+HK&amp;display=swap</a></li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="255119" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mapping-a-language-to-a-font-charset/48771/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-255119" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="255119"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="255121" data-post-id="255121">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kip" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kip/120/1440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kip
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>ex_cldr Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh, that seems straight forward indeed. Just need a mapping from the ISO 639 language and/or ISO 4217 territory code to the Google Fonts language and it seems good to go!</p>
<p>Was a fun excursion!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="255121" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mapping-a-language-to-a-font-charset/48771/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-255121" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="255121"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>