File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1313 * limitations under the License.
1414 */
1515
16+ import { FeatureTest , isNodeJS } from "../../src/shared/util.js" ;
1617import { buildGetDocumentParams } from "./test_utils.js" ;
1718import { getDocument } from "../../src/display/api.js" ;
18- import { isNodeJS } from "../../src/shared/util.js" ;
1919import { TextLayer } from "../../src/display/text_layer.js" ;
2020
2121describe ( "textLayer" , function ( ) {
@@ -250,4 +250,21 @@ describe("textLayer", function () {
250250
251251 await loadingTask . destroy ( ) ;
252252 } ) ;
253+
254+ it ( "should use Calibri and Lucida Console on Windows with Firefox" , async function ( ) {
255+ spyOnProperty ( FeatureTest , "platform" , "get" ) . and . returnValue ( {
256+ isWindows : true ,
257+ isFirefox : true ,
258+ } ) ;
259+
260+ const fontFamilyMap = TextLayer . fontFamilyMap ;
261+ const expectedSansSerif = "Calibri, sans-serif" ;
262+ const expectedMonospace = "Lucida Console, monospace" ;
263+
264+ const actualSansSerif = fontFamilyMap . get ( "sans-serif" ) ;
265+ const actualMonospace = fontFamilyMap . get ( "monospace" ) ;
266+
267+ expect ( actualSansSerif ) . toBe ( expectedSansSerif ) ;
268+ expect ( actualMonospace ) . toBe ( expectedMonospace ) ;
269+ } ) ;
253270} ) ;
You can’t perform that action at this time.
0 commit comments