我修改了现有的websocket客户端以保存来自websocket服务器的消息有效负载:
fn main()
{
let mut globaltest = "";
// ...some othercode
let receive_loop = thread::spawn(move || {
// Receive loop
for message in receiver.incoming_messages() {
let message: Message = match message {
Ok(m) => m,
Err(e) => {
println!("Receive Loop: {:?}", e);
let _ = tx_1.send(Message::close());
return;
}
};
match message.opcode {
Type::Close => {
// Got a close message, so send a close message and return
let _ = tx_1.send(Message::close());
return;
}
Type::Ping => match tx_1.send(Message::pong(message.payload)) …Run Code Online (Sandbox Code Playgroud) 我发现某些字体类型无法在 UWP 中使用。
例如:Noto Sans CJK TC,或者 Noto Sans(都是谷歌开源字体)
即使此字体已安装在系统中,或放入应用程序项目并使用“ms-appx:”或相对路径来设置此字体。
(就像这个问题的答案:UWP - Font only apply in Designer,它提供了一个例子,能够使用自定义字体)
当我应用一些字体时,只在设计器中看到效果,而在运行时看不到。
并且有指导方针,但没有告诉如何知道哪种字体类型不能在 UWP 中使用。 https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/fonts?f=255&MSPPError=-2147217396
UWP 中是否有任何字体类型限制?
谢谢!