mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Creates a separate atlas context and cache for color and alpha bitmap glyphs. Removes SDF shader and uses separate shader for full color glyphs. Requires https://github.com/flutter/engine/pull/41754 Fixes https://github.com/flutter/flutter/issues/116818 Fixes https://github.com/flutter/flutter/issues/126101 This also fixes https://github.com/flutter/engine/pull/39383 but for light text on a dark background. This problem crops up when we switch to a full color atlas. In this context, the chosen glyph color is important. But with the alpha channel only atlas, its irrelevant. See diff:  Example app: ```dart // Copyright 2014 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; void main() => runApp( Container( alignment: Alignment.center, child: Text( ''' (Unicode Conference)Ø Ø§ÙØ°Ù Ø³ÙØ¹Ùد ÙÙ 10-12 آذار 1997 ب٠دÙÙØ© Ù ÙØ§ÙÙÙÙØªÙØ³Ø Ø£Ù٠اÙÙØ§. Ù Ø³ÙØ¬Ù ع اÙ٠ؤت٠ر بÙ٠خبراء Ù Ù ÙØ§ÙØ© ÙØ·Ø§Ø¹Ø§Øª Ø§ÙØµÙاعة عÙÙ Ø§ÙØ´Ø¨ÙØ© Ø§ÙØ¹Ø§ÙÙ ÙØ© Ø§ÙØªØ±ÙÙØª ÙÙÙÙÙÙÙØ¯Ø ØÙØ« Ø³ØªØªÙ Ø Ø¹ÙÙ Ø§ÙØµØ¹ÙدÙÙ Ø§ÙØ¯ÙÙÙ ÙØ§ÙÙ ØÙ٠عÙÙ ØØ¯ Ø³ÙØ§Ø¡ Ù ÙØ§Ùشة سب٠استخدا٠ÙÙÙÙÙØ¯ Ù٠اÙÙØ¸Ù اÙÙØ§Ø¦Ù Ø© ÙÙÙ٠ا ÙØ®Øµ Ø§ÙØªØ·Ø¨ÙÙØ§Øª Ø§ÙØØ§Ø³ÙØ¨ÙØ©Ø Ø§ÙØ®Ø·ÙØ·Ø ØªØµÙ Ù٠اÙÙØµÙص ÙØ§ÙØÙسبة ٠تعددة اÙÙØºØ§Øª. Ù ÙÙ ÙÙ ÙÙ ÙÙÙ ÙÙð ð ð ð ð''', textDirection: TextDirection.rtl, style: TextStyle(fontSize: 24, color: Colors.white), ), ), ); ```